Problem setting width of an item

4 posts, 0 answers
  1. Sven
    Sven avatar
    2 posts
    Member since:
    Mar 2008

    Posted 19 Mar 2008 Link to this post

    I have a tabstrip with 4 tabpages. I could only change the Bounds.Width of the first tabpage. When i try to edit the bounds.width of the second tabpage, nothing happens..., it allways resets to its default value.

    Can someone please help me... What am I doing wrong here?
  2. Angel
    Admin
    Angel avatar
    121 posts

    Posted 19 Mar 2008 Link to this post

    Hello Sven,

    I'm not sure I completely understand your issue.

    To which element do you set Bounds.Width - the TabItem, the HostItem or the hosted panel control?

    If you are trying to set the size of the hosted panel (i.e. the panel in which the controls for a TabItem are put), nothing should happen. The size of that panel is determined by the size of the RadTabStrip control and the size of the strip with TabItems.

    Could you also tell me which version of our controls you are using, so I can make tests with the same version.

    I'm looking forward to your response.

    Kind regards,
    Angel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Sven
    Sven avatar
    2 posts
    Member since:
    Mar 2008

    Posted 20 Mar 2008 Link to this post

    Dear,

    thank you for your quick response.

    I want to set the bounds.with of the (second)  TabItem.

    Actually i want the 4 tabitems to cover the witdh of the whole tabstrip. So the width of each item is the total witdt / 4.

    I work with RadControls for WinForms Q1 2007

    Thank you
     

  5. Angel
    Admin
    Angel avatar
    121 posts

    Posted 20 Mar 2008 Link to this post

    Hi Sven,

    By default the size of a tab item is calculated based on its text and image.

    If the size of the RadTabStrip is constant you may achieve your goal in two ways:
    1. by using TabItem.Padding property to inflate the tab item.
    2. by using TabItem.MaxSize / TabItem.MinSize properties to ensure the necessary size constraints.

    If the tab strip is dynamically resizable and you wish the tab items to be always with 1 / 4 of the tab strip's width you will have to handle the resizing of the tab strip and set the necessary size constraints for the tab items.

    All the best,
    Angel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top