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

RadComboBoxElement with text clipped

1 Answer 51 Views
Toolstrip (obsolete as of Q3 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.
Loy Chan
Top achievements
Rank 1
Loy Chan asked on 07 Jan 2009, 11:29 PM
I have a RadToolstrip that contains multiple RadComboBoxElements.

I've resized the comboboxelements to larger (than default) width to fully display the text within it. Although the combobox is resized to the expected width, the embedded textbox is not resized. Thus the text is clipped.

I noticed that someone else on the forums (in 2007) noticed the same behaviour and the advice was to change the width of both minSize and maxSize. I've done this but didn't see any change to the behaviour.

I'm using the 2008 Q3 version.

To reproduce
1.create a simple winforms project
2. add a radtoolstrip (i docked it to top)
3. add a radcomboboxelement and change minsize, maxsize widths to 150.
4. run program

You'll see the default name radComboBoxElement1 is clipped


Any suggestions?

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 08 Jan 2009, 02:15 PM
Hello Loy Chan,

Thank you the question.

Currently, in order to get the TextBoxItem expanded, you should set its MinSize as well. Please refer to the following code snippet:
this.radComboBoxElement1.MinSize = new Size(150, 0);  
this.radComboBoxElement1.TextBoxElement.Children[0].MinSize = new Size(this.radComboBoxElement1.Size.Width - 22, 0); 

I hope this helps. If you have additional questions, feel free to contact me.

All the best,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Toolstrip (obsolete as of Q3 2010)
Asked by
Loy Chan
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or