Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
Dealing with overflow text in UltraComboEditor
posted

As I have a client who is demanding somewhat crowded forms with too much text displayed in their combos, I'm messing around trying to improve the behaviour of the ComboEditor when it contains text that is too long to fit in the editor.

I'm running with autocomplete on, and as soon as the user types in something that autocompletes to an item longer than the combo width, the focus shifts to the right-most part of the text and they can't see what they were typing any more. The same behaviour also happens with using the up-down keys to cycle between items in the list.

As the client has a strong preference to view the left-most part of the text, and form re-design to extend the combos is out of the question, anyone have ideas on how I might force the control to stay focused on the left part of the text?

 I've had minor success with using Select(0, 0) to do this on AfterDropDown/AfterCloseUp, but this doesn't do the trick in any other events.

Parents
No Data
Reply
  • 469350
    Offline posted

    I don't have any conrete ideas for you here. But it might help you to know that when the combo goes into edit mode, it display an Inbox TextBox control over itself to handle the editing. So you might want to see if it's possible to do this with a Microsoft TextBox. If so, you can do someting like combo.Controls[0] to get a reference to the TextBox control and deal with it directly. This will, of course, only work when the control is in edit mode. 

Children