Jump to content

UniCombobox with ReadOnly = True, ReadOnlyMode = urmNotEditable - how to get ItemIndex of selected Item?


Nadya

Recommended Posts

Hello!

I have a UniComboBox with variants of data I should display, so I need to know the ItemIndex of selected item.

To prevent changing the text of ComboBox manually, I set ReadOnly = True, and ReadOnlyMode = urmNotEditable.

In that case ItemIndex value doesn't change, when I select an item in runtime

If ReadOnly = False - itemIndex updates correctly, but I user can type any text to ComboBox text area and ItemIndex in that case = -1, it's not a good idea I think

I can't set Enabled = False, cause user would not be able select items

Is there any way to solve this problem?

Thanks a lot for help!

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...