Link to home
Start Free TrialLog in
Avatar of jupe
jupe

asked on

TDBLookupCombobox question

Normaly the Text of a DBLookupCombobox is changed by the 'arrow up' and 'arrow down' keys. How can I change the DBLookupText by the program i.e. simulate the 'arrow up' and 'arrow down' keys?
Avatar of kretzschmar
kretzschmar
Flag of Germany image

hi jupe,

try to scroll the underlying dataset
like
DBLookupCombobox1.ListSource.Dataset.next;

be sure that the datasource.dataset is in editmode

meikl

Avatar of jupe
jupe

ASKER

Hi meikl

I did the following:

      With DBLookupCombobox1 Do
        Begin
         IF ListSource.DataSet.Eof=False Then
          Begin
           DataSource.Dataset.Edit;
           ListSource.Dataset.Next;
          End;
        End;

Nothing happens.
What did I miss?

Thanks
jupe:

I can give you an idea.it is very easy.

DBLookupComboBox1.Perform(WM_KEYDOWN,VK_DOWN,0);

menxin
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jupe

ASKER

Hi menxin

I have given the points to kretzschmar. Would like to give you 50 points, too. How can I do this?

jupe
jupe:

That 's allright.
My pleasure to help you!

:-)

menxin
Avatar of jupe

ASKER

menxin

Thanks very much for your help. I would never have found your solution. Have a nice Sunday.

jupe