Thread View: comp.lang.pascal.delphi.databases
2 messages
2 total messages
Started by Marc Scheuner
Mon, 18 May 1998 00:00
Combined DBEdit / DBLookupCombo
Author: Marc Scheuner
Date: Mon, 18 May 1998 00:00
Date: Mon, 18 May 1998 00:00
22 lines
1723 bytes
1723 bytes
I have the following setup: I have a TDBEdit control to enter a code value, and a TDBLookupCombo that will display the clear text of the codes and select the code (a numerical value) into the same field as referenced by the TDBEdit object. When I enter a value in the TDBEdit and leave the field, the TDBLookupCombo gets updated, as expected, and vice-versa. But how can I get the DBLookupCombo to update *WHILE* I am typing in codes in the TDBEdit? I tried to find a method to "synchronize" these two controls, but even studying the VCL source code didn't reveal any "legal" (i.e. "public") way to do so. Any hints? Marc ------------------------------------------------------------------------ Marc Scheuner marc.scheuner@berner.ch Berner Versicherungen / ISV Tel ++41 31 / 384 5630 Sulgeneckstrasse 19 Fax ++41 31 / 384 5490 CH-3001 Bern, Switzerland ------------------------------------------------------------------------
Re: Combined DBEdit / DBLookupCombo
Author: Christian R. Conrad
Date: Thu, 21 May 1998 00:00
Date: Thu, 21 May 1998 00:00
33 lines
2044 bytes
2044 bytes
On Mon, 18 May 1998 14:00:40 GMT, marc.scheuner@no.spam.please.ch
(Marc Scheuner) wrote:
> I have the following setup: I have a TDBEdit control to enter a code
> value, and a TDBLookupCombo that will display the clear text of the
> codes and select the code (a numerical value) into the same field as
> referenced by the TDBEdit object.
> When I enter a value in the TDBEdit and leave the field, the
> TDBLookupCombo gets updated, as expected, and vice-versa.
> But how can I get the DBLookupCombo to update *WHILE* I am typing in
> codes in the TDBEdit? I tried to find a method to "synchronize" these
> two controls, but even studying the VCL source code didn't reveal any
> "legal" (i.e. "public") way to do so. Any hints?
I dunno...
Perhaps a Locate on the Lookup data set in the OnChange event of the
DBEdit. Unless that leads to an endless loop? But it shouldn't, should
it, for the first call to Locate should find the correct value (if one
exists), and then the second should only find the same --> no change.
I think, but no guarantees... Try it out for yourself, and good luck!
Christian R. Conrad
--
Proud and sole owner of all opinions (except quotes) expressed above!
======================================================================
"Wave goodbye to RISC. It's the rotary engine of computing."
Brad Aisa, in comp.lang.pascal.delphi.advocacy
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads