Board index » delphi » Query TTable Object For Active Field

Query TTable Object For Active Field

I need to know how to query a TTable object or Datasource at runtime to
which field in the underlying data structure currently has the focus. Any
ideas?

 

Re:Query TTable Object For Active Field


Gordon Harlow <glhar...@deltanet.com> wrote in article
<01bba5c6$39cd8ae0$b9bfa...@Pglharlo.Deltanet>...

Quote
> I need to know how to query a TTable object or Datasource
at runtime to
> which field in the underlying data structure currently
has the focus. Any
> ideas?

Gordon,

There's no such thing as field focus on the database level.
All the database knows is the current record.
If you're using data-bound controls, you can examine the
TForm.ActiveControl - that should tell you which field has
the focus.

HTH
Peter

Re:Query TTable Object For Active Field


Quote
"Gordon Harlow" <glhar...@deltanet.com> wrote:
>I need to know how to query a TTable object or Datasource at runtime to
>which field in the underlying data structure currently has the focus. Any
>ideas?

Huh? Do you want to see which data-aware control has focus?

I would iterate through the Form's Controls list and see who had a
DataSource.DataSet that matched.

Cheers

Other Threads