Solved

!!!!!!!!ITERESTING...........¡¡¡¡¡¡¡......DBLOOKUPCOMBOBOX

Posted on 2000-02-25
11
230 Views
Last Modified: 2010-04-04
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.........at 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
0
Comment
Question by:Iamme
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 5

Expert Comment

by:TheNeil
ID: 2558500
I don't know the dblookupcombobox too well but looking at the help what I'd do is this.

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
0
 

Author Comment

by:Iamme
ID: 2558553
is there any propierti that tell  me what is the index value...............?
0
 
LVL 5

Expert Comment

by:TheNeil
ID: 2558584
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
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:florisb
ID: 2558605
You can't read itemIndex (x) and with that int check the items array? (items[x])?

Weekend!

Floris.
0
 
LVL 5

Expert Comment

by:TheNeil
ID: 2558628
I was using the standard Combobox as an example

The Neil
0
 
LVL 1

Expert Comment

by:AttarSoftware
ID: 2558641
For standard comboboxes,

  if( ComboBox1.ItemIndex > -1 ) then
    ShowMessage( ComboBox1.Items[ ComboBox1.ItemIndex ] ) ;

works...don't know about dbLookupComboBoxes...sorry...

Tim.
0
 

Author Comment

by:Iamme
ID: 2558657
there is a littel problem.........it is not a  Tcombobox it is a
TDBLookupcombobox
is it the same????
0
 

Author Comment

by:Iamme
ID: 2558664
ok ..don't worry ......but if you can help ........ok
0
 

Author Comment

by:Iamme
ID: 2558696
ok ..don't worry ......but if you can help ........ok
0
 
LVL 17

Expert Comment

by:inthe
ID: 2559210
hi
maybe you can do onmouseup :

showmessage(inttostr(dblookupcombobox1.ListFieldIndex));
0
 

Accepted Solution

by:
rktroubled earned 10 total points
ID: 2559738
I think what you are looking for is the KeyValue property of the DBLookUpComboBox. This gives you the value that is actually being written to the dataset field that the control is bound to as opposed to the value being displayed to the user. To know that the field has been changed by the user, the OnChange event of the dataset field can be handled.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Working with hours 3 74
Moving (cutting/pasting) controls in a TTabbedNotebook... 7 47
PHP preg_replace code convert to Delphi 14 80
firemonkey keyboard covers the controls 1 53
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question