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

Alignment of wide text in RadComboBox

1 Answer 140 Views
ComboBox and ListBox (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.
Kevin Meyer
Top achievements
Rank 1
Kevin Meyer asked on 14 Feb 2008, 09:55 PM
I have a requirement to left-align text in combo boxes, even if the text flows past the width of the control.  Q3 2007 SP1 defaults to showing item text right-aligned if overflowing the control.  Is there a setting to change this?

This behavior can be seen in the First Look (My Tunes) demo.  Choose Artist: "Sting", Album: "Brand New Day", Song: "7. Prelude To The End Of The Game".  Notice the song combo box reads "e To The End Of The Game" after losing focus.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 15 Feb 2008, 03:25 PM
Hi Kevin Meyer,

Unfortunately, the RadComboBox has been designed to behave in such a way. Currently, there is no way to change the behavior through the API. We are aware of this issue and it is in our TODO list. However, to avoid this behavior, I would suggest the following workaround :

private void radComboBox1_DropDownClosed(object sender, Telerik.WinControls.UI.RadPopupClosedEventArgs args)

    radComboBox1.SelectionLength = 0;
}

Setting SelectionLength to 0 will remove the selection, but will set the textbox caret in the beginning of the text.
This you could also do when the Up/Down key is pressed to handle the case when the user uses the arrow keys to select an item.

If you have any additional questions, please write us again.

Greetings,
Georgi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Kevin Meyer
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or