Name Value Pairs in a ComboBox
Posted
by JamesB
on Stack Overflow
See other posts from Stack Overflow
or by JamesB
Published on 2010-06-11T13:03:07Z
Indexed on
2010/06/11
13:13 UTC
Read the original article
Hit count: 200
I'm convinced this must be a common problem, but I can't seem to find a simple solution...
I want to use a combobox control with name value pairs as the items. ComboBox takes TStrings as its items so that should be fine.
Unfortunately the drawing method on a combobox draws Items[i] so you get Name=Value in the box.
I'd like the value to be hidden, so I can work with the value in code, but the user sees the name.
Any Ideas?
© Stack Overflow or respective owner