TwwDbgrid in a embedded Form Disappears if UseTFields=False

20 views
Skip to first unread message

tav...@gmail.com

unread,
Oct 12, 2018, 4:31:28 PM10/12/18
to woll2woll.infopower
Hello!
I am having a problem that I do not know how to solve: I will try to expose the problem.
I have a class that contains a TwwDbGrid:

  TEmbeddedForm = class (TForm)
    grd1: TwwDBGrid;

I have another class:

  TPagesForm = class (TForm)
    Pages : TPageControl ;

This second class contains a TPageControl with several tabs. This form has a function that takes care of giving persistence to the selected tab (when starting it shows the same tab that was selected when the form was closed)
In one of them, embedding the EmbeddedForm form:

  EmbedForm: = TEmbeddedForm.Create (Self);
  EmbedForm.Parent: = PagesForm.tabsheet1; // One of the tabs
 
This has worked well for a long time. So far, I've decided to add dgProportionalColResize to the Options property of the grid. For this I put UseTFields to False.

Now: if the tab stored (or the first to be displayed) is tabsheet1 (the one that contains TwwDbgrid) the grid does not appear !!! If I change the tab and return to it then the grid appears. When I say "it does not appear" I am not saying that the columns do not appear: La grilla no está (no puede capturar su evento OnDblClick), as if its Visible property was False.

If I put UseTFields in True and remove dgProportionalColResize from the Options property then everything goes back to normal.
That could be happening? I'm probably doing something wrong, but I do not know how to solve it.

Thank you very much for reading
Greetings from Argentina.
Reply all
Reply to author
Forward
0 new messages