RadComboBoxElement with text clipped

2 posts, 0 answers
  1. Loy Chan
    Loy Chan avatar
    21 posts
    Member since:
    Mar 2008

    Posted 07 Jan 2009 Link to this post

    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?
  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 08 Jan 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top