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
620
select all text in an ultracomboboxeditor on click
posted

Hi,

i try to select all text in an ultracomboboxeditor when i click on it.

I dont want that when i click on it i have the cursor in the middle of the ultracombobox editor.

I try on enter event with ultracomboxeditor.select() but nothing

tks

  • 4625
    Offline posted

    Hi Luca,

    Thank you for posting in our forums!

    In order to explicitly highlight the selected text and position the cursor at the end of it, you can use combo editor’s AfterEnterEditMode event.

    private void ultraComboEditor1_AfterEnterEditMode(object sender, EventsArgs e)
    {
          ultraComboEditor1.Editor.SelectionStart = 0;
          ultraComboEditor1.Editor.SelectionLength = ultraComboEditor1.Text.Length;
    }

    Please let me know if you have any further questions.