This is a migrated thread and some comments may be shown as answers.

Problem setting width of an item

3 Answers 91 Views
Tabstrip (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sven
Top achievements
Rank 1
Sven asked on 19 Mar 2008, 03:51 PM
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?

3 Answers, 1 is accepted

Sort by
0
Angel
Telerik team
answered on 19 Mar 2008, 04:50 PM
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
0
Sven
Top achievements
Rank 1
answered on 20 Mar 2008, 06:53 AM
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
 

0
Angel
Telerik team
answered on 20 Mar 2008, 02:37 PM
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
Tags
Tabstrip (obsolete as of Q2 2010)
Asked by
Sven
Top achievements
Rank 1
Answers by
Angel
Telerik team
Sven
Top achievements
Rank 1
Share this question
or