Subject Re: [IBO] Saving and loading queries FieldIndex and FieldDisplayWidth values
Author Elmar Knoerzer
Hi Sergio,
thank you for your answer.
Could you send me a short snippet of your source where you hook in?

But i'm not sure that's the right way.

I like to do this in the query, because of if i have 2 or 3 grids on
one form and only in one of them the Fields are changable, it must be
set in the query.

My first Attempt was to do this in a descendent of IB_Grid, but it
doesn't work.


--- In, Sergio Zoccante <sergiozoccante@...>
> Hi, Elmar
> I made this by a descendant of TForm, which contain a IB_grid linked to
> IB_Query...;). And I used the OnFormCreate and OnFormClose events for
> loading and saving FieldIndex and FieldDisplayWidth settings.
> Sergio
> **************
> Elmar Knoerzer wrote:
> >
> > Hi,
> > it's easy to save and load queries FieldIndex and FieldDisplayWidth
> > values with commatext.
> >
> > Now i like to make a descendant of TIB_Query to do this automatically.
> >
> > But i found no way to "hook" into the query to do this.
> >
> > I would like to make a property "querysettings" and if this is true,
> > the query should read the FieldIndex and FieldDisplayWidth values out
> > of the database best in the beforeprepare event and saving them in the
> > beforeclose event.
> >
> > Has someone an idea how to do this?
> >
> > Best regards
> >
> > Elmar
> >