Iamme
asked on
!!!!!!!!ITERESTING...........¡¡¡¡¡¡¡......DBLOOKUPCOMBOBOX
hello.....well I hava had a lot of problems with the component.dbloojupcombobox .......... ....now I have this problem...:
I don't know how to know if the user have selected any Item.......does the component have a propierti that tell us where is the pointer of the dblookupcombobox.........a t the array ()
ok ........
if a have selected the first ITEM how can I know that I have selected this ITEM
sorry i don't talk english very welll
I don't know how to know if the user have selected any Item.......does the component have a propierti that tell us where is the pointer of the dblookupcombobox.........a
ok ........
if a have selected the first ITEM how can I know that I have selected this ITEM
sorry i don't talk english very welll
ASKER
is there any propierti that tell me what is the index value...............?
Not that I can see. That's why you'd have to do the search yourself. It's not a big job though - You know the text selected and I assume you can gain access to the list of items so you just use something like the following
iIndex := -1;
FOR iCount := 0 TO <No Items>
DO
IF ComboBox1.Text = ComboBox1.Items[iCount]
THEN
iIndex := iCount;
The Neil
iIndex := -1;
FOR iCount := 0 TO <No Items>
DO
IF ComboBox1.Text = ComboBox1.Items[iCount]
THEN
iIndex := iCount;
The Neil
You can't read itemIndex (x) and with that int check the items array? (items[x])?
Weekend!
Floris.
Weekend!
Floris.
I was using the standard Combobox as an example
The Neil
The Neil
For standard comboboxes,
if( ComboBox1.ItemIndex > -1 ) then
ShowMessage( ComboBox1.Items[ ComboBox1.ItemIndex ] ) ;
works...don't know about dbLookupComboBoxes...sorry ...
Tim.
if( ComboBox1.ItemIndex > -1 ) then
ShowMessage( ComboBox1.Items[ ComboBox1.ItemIndex ] ) ;
works...don't know about dbLookupComboBoxes...sorry
Tim.
ASKER
there is a littel problem.........it is not a Tcombobox it is a
TDBLookupcombobox
is it the same????
TDBLookupcombobox
is it the same????
ASKER
ok ..don't worry ......but if you can help ........ok
ASKER
ok ..don't worry ......but if you can help ........ok
hi
maybe you can do onmouseup :
showmessage(inttostr(dbloo kupcombobo x1.ListFie ldIndex));
maybe you can do onmouseup :
showmessage(inttostr(dbloo
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1. Use the OnClick event
2. Iterate through the items in the list using a FOR loop, looking for a match. When you get a match, you've got your index value
The Neil