Subject Disappearing grids mistery resolved?
Author lobolo2000
It seems the disappearing grids is due to a VCL bug and not related to IBO.
I was able to instantiate the same bug with simple controls instead of
IBGrid. With a PageControl having 2 Tabsheets, and an Edit on Tabsheet 2,
and:

procedure TForm1.TabSheet2Show(Sender: TObject);
begin
Edit1.show;
end;

procedure TForm1.TabSheet2Hide(Sender: TObject);
begin // (put compiler optimizations off and set a breakpoint here)
end;

Upon entering TabSheet2, TabSheet2Show gets called, followed by a call to
TabSheet2Hide!! It seems that the Hide method is being called where it
should not, and hence it is not the grid which is not painted, but the whole
page. And this seems related to the Edit1.Show, as removing it will
eliminate the symptoms.

A workaround is to set the visible property to true instead of using the
Show method. So if the above proves correct, then a possible fix to IB_Grid
is to eliminate all calls to Show by setting the visible property instead.
But unfortunately, I could not locate any call to Show in IB_Grid. So it may
be another method that has the same bug. Any ideas?

HTH




_________________________________________________________
Do You Yahoo!?
Get your free @... address at http://mail.yahoo.com