Subject Re: Problem with TIB_Grid/TIB_LookupCombo
Author slsolutions2002
Hello Marco:

You are correct my problem is same, having to do with
ClearSelection. I applied your patch and all works fine.

Thanks

--- In IBObjects@y..., "mmenaz" <mmenaz@l...> wrote:
> I've a SIMILAR problem, and I've produced a patch for IB_Grid.pas.
In my situation, the error is rided only if you have TIB_LookupCombo
ClearSelection set to true (test it set to false).
> You can apply the following patch against IB_Grid.pas, recompile
IBO and see (or include the IB_Grid.pas in your project... set a
breakpoint in the patch code to be sure you are running the right
code, don't compile wiht packages)
> (around source line 8240...)
>
> TIB_CustomCombo.CMExit
> ...(cut)
> if ClearSelectionOnExit then
> try
> ClearSelection( False );
> except
> on EAbort do
> ;
> end;
> Invalidate;
> ...(cut)
>
> Let me know, since it works good for me and Geoff is testin it too.
We would like Jason include in the next subrelease when ready :)
> Regards
> Marco Menardi
>
> --- In IBObjects@y..., "slsolutions2002" <strtline@a...> wrote:
> > Hello:
> >
> > I have the following:
> >
> > A form with a TIB_Grid and a TIB_LookupCombo in the grid. In the
> > forms OnShow I open 2 queries, one for the TIB_Grid, the other
for
> > the TIB_LookupCombo. In the forms OnClose I close both queries.
> >
> > All works fine unless I try to close the form with the
> > TIB_LookupCombo in a dropped down state. I then get a "Cannot
focus
> > a disabled or invisible window". I actually get it twice. If I
> > closeup the TIB_LookupCombo before closing the form all works
fine.
> >
> > The error happens when I attempt to close the queries in the
forms
> > OnClose. Like I said, I get the error twice, once for each query
I
> > close. I have tried calling the TIB_LookipCombos CloseUp routine
> > before closing the queries but the lookup does not close and I
still
> > get the error.
> >
> > Thanks