Thread View: comp.lang.pascal.delphi.components.writing
2 messages
2 total messages
Started by Marc Scheuner
Mon, 05 Jan 1998 00:00
Data-aware edit field
Author: Marc Scheuner
Date: Mon, 05 Jan 1998 00:00
Date: Mon, 05 Jan 1998 00:00
25 lines
1704 bytes
1704 bytes
Folks I have a non-visible component that "attaches" to two edit fields and provides a means of displaying a code in one of the edit fields, and the corresponding description in the other edit field (by means of a lookup table). This works nicely with TEdit fields. But, when I have a TDBEdit field, the component seems to work alright: if I enter a valid code in the code DBedit field, the full text DBedit field gets updated with the corresponding description that belongs to that code, but if I tab into the full text DBedit field, I get the value stored on the underlying table again, instead of the new value. What's wrong? I am setting the new values of the DBedit fields by assigning new values to their .Text properties, I was expecting that this should be enough to get the field value updated (but obviously it's not enough). Any hints? Thanks in advance! Marc ====================================================================== [ Marc Scheuner, marc.scheuner@berner.ch CH-3001 BERNE, Switzerland ] ======================================================================
Re: Data-aware edit field
Author: Stephen Moran
Date: Mon, 05 Jan 1998 00:00
Date: Mon, 05 Jan 1998 00:00
36 lines
2249 bytes
2249 bytes
The dbEdit's Field has to have its value set. Table.Post after setting the dbEdit's Text should do it. Marc Scheuner wrote: > > Folks > > I have a non-visible component that "attaches" to two edit fields and > provides a means of displaying a code in one of the edit fields, and > the corresponding description in the other edit field (by means of a > lookup table). This works nicely with TEdit fields. > > But, when I have a TDBEdit field, the component seems to work alright: > if I enter a valid code in the code DBedit field, the full text DBedit > field gets updated with the corresponding description that belongs to > that code, but if I tab into the full text DBedit field, I get the > value stored on the underlying table again, instead of the new value. > > What's wrong? I am setting the new values of the DBedit fields by > assigning new values to their .Text properties, I was expecting that > this should be enough to get the field value updated (but obviously > it's not enough). > > Any hints? Thanks in advance! > Marc > > ====================================================================== > [ Marc Scheuner, marc.scheuner@berner.ch CH-3001 BERNE, Switzerland ] > ====================================================================== -- +--------------------------------------------------------------------+ | Steve Moran, Flying Objects Ltd, London. | | Custom-made Computer Programs. Email: flyingobjects@hotmail.com | +--------------------------------------------------------------------+
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