Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIWComboBox + OnAsyncChange + ItemsHaveValues
#5
Let's circle back to points in my first post:

1.  The ItemIndex seems to be affected by the Values[] column.

2.  Desired behavior is for ItemIndex to be updated to the true selection offset regardless of the Items content.

We should focus on these points as opposed to how ItemsHaveValues was implemented.


>>[KUDZU]: IWComboBox mirrors TComboBox in behavior as it shares the same RTL routines.

If I add these to a TComboBox Items property:

A=1, B=1, C=1, D=2
or
'','','',''

the correct ItemIndex is always returned on selection, ItemIndex is not dependent on Items content.  ItemIndex always means selected offset.



>>[KUDZU]: TStrings has built in methods for the keys and values, and its how they work. They dont deal with duplicates.

If IWComboBox/ItemsHaveValues=true only uses TStrings built-in methods and cannot return a ItemIndex as true selected offset then I guess it needs
more logic beyond TStrings.
Reply


Messages In This Thread
RE: TIWComboBox + OnAsyncChange + ItemsHaveValues - by MJS@mjs.us - 12-18-2021, 04:58 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)