Chrism
asked on
All selected in TBLookupListBox?
When I single click in the TBLookupListBox control, all the items are selected, and I cannot prevent or alter this.
I am using Delphi 3 Standard.
How can I just have one item selected?
I am using Delphi 3 Standard.
How can I just have one item selected?
Show us how you've set up the lookup criteria. Are you using persistant fields.?
Have you got multiple select set to false?
Darren
Have you got multiple select set to false?
Darren
ASKER
There is no source involved with this item...as soon as I put the control on the form and connected the source, when I ran the program, I got this problem?
I do not know if I am using persistent fields (sorry), and I have not set MultiSelect anywhere.
The only things I have set that might be of interest are:
Datafield and DataSource are both blank.
KeyField = Inv_ID
ListField = Inv_Line_Desc
ListFieldIndex = 0
ListSource = Inv_Lines
ReadOnly = False
I have not set any other properties, but I will test anything suggested at this stage!
I do not know if I am using persistent fields (sorry), and I have not set MultiSelect anywhere.
The only things I have set that might be of interest are:
Datafield and DataSource are both blank.
KeyField = Inv_ID
ListField = Inv_Line_Desc
ListFieldIndex = 0
ListSource = Inv_Lines
ReadOnly = False
I have not set any other properties, but I will test anything suggested at this stage!
Chrism,
I tried it with BioLife table from DBDemos :
ListSource = DataSource1 (DataSource1 is attached to table1, with table1 set to biolife table. Active = True)
KeyField : Species No
ListField : Species Name
ListFieldIndex : 0
ReadOnly : False
it works perfectly.
Regards, Zif.
I tried it with BioLife table from DBDemos :
ListSource = DataSource1 (DataSource1 is attached to table1, with table1 set to biolife table. Active = True)
KeyField : Species No
ListField : Species Name
ListFieldIndex : 0
ReadOnly : False
it works perfectly.
Regards, Zif.
ASKER
Um..err...I am suitably embarrassed.
Thankyou for your persistance Zif, although your response did not solve the problem exactly, it indicated to me what the problem was. (and it all makes perfect sense now)
Because the KeyField was set to a foreign key, the way the listbox was set up was that every element in the listbox had the same value as in KeyField, therefore, when one was selected, all items were highlighted.
Please repost as an answer, as it was your persistance that got me through my stupidity.
Thankyou for your persistance Zif, although your response did not solve the problem exactly, it indicated to me what the problem was. (and it all makes perfect sense now)
Because the KeyField was set to a foreign key, the way the listbox was set up was that every element in the listbox had the same value as in KeyField, therefore, when one was selected, all items were highlighted.
Please repost as an answer, as it was your persistance that got me through my stupidity.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I just tried to replicate your error, but I've no problem.
Can you show some source or handlings?
Zif.