Re: tdbLookupComboBox.ListFieldIndex Problem

Skip to first unread message

Jul 9, 2016, 3:10:46 PM7/9/16
Dne pátek 9. října 1998 9:00:00 UTC+2 Thomas C. Hannum napsal(a):
> Hi,
> Using Delphi 3.02 c/s I'm trying to change the Listfieldindex property
> on the fly. Tracing the code, Delphi says I did change it, but the field
> displayed in the lookupcombobox doesn't change.
> The only way I can change the listfieldindex, is in the object
> inspector.
> Example:
> The database has City, State, and Zip as 3 fields. I have City;State;Zip
> in the listfield, and listfieldindex = 0 in the object inspector. Run
> the app, chose a record and the City is displayed. When I change the
> listfieldindex to 2 in the code, and refresh the dblookupcombobox, do a
> pulldown and select a record, I should see Zip displayed when I close
> the list, but it still has the City there.
> I also tried tdblookupcombobox.invalidate to redisplay the control, but
> that didn't help either.
> Any thoughts?
> Thanks
> Tom Hannum

I had the same problem. When DataSet of the list of ComboBox is set, it will ignore changes of the ListFieldIndex. I changed order and when I set ListFieldIndex BEFORE seting ListSource property it now works well.
Reply all
Reply to author
0 new messages