Closed petko closed 2 months ago
That prop needs that tab-control is repainted first. so can you make a demo in Delphi- which shows many tabs, then you press a button and it calls MakeVisible for last tab?
Yes, calling it via button works. However I can't do it programatically even after calling Refresh
, Repaint
or Invalidate
.
What are my options here?
tabs.Invalidate; Application.ProcessMessages;
then try it again?
It kinda works that way. The correct tab is set, but there is always a flash of content, which is not optimal. The tabs are first painted without being scrolled and then they are scrolled to the correct place.
Then please try Repaint or Paint, without App.ProcessMessages, after setting the correct sizes of control.
Using Repaint without ProcessMessages is better. There is still a quick flash, but I guess there is no way to pre-scroll to the tab before painting the control currently..
I guess we can pre render it, even with Visible off state Paint method must work (not tested)
I can confirm the problem and the fix. I am not sure in which combinations of settings it does occur, but here are screenshot from my app if Size
is used instead of Height
:
On the High DPI monitor:
When moved to the low-DPI monitor (notice the missing closing bracket):
When the Height
fix is applied it shows on both monitors as on the high-dpi above.
Was it message for #75 ?
I am puzzled today, how to see the issue, is it fixed or not yet? can you give very small example to show the problem? better in Pascal.
Yes, these messages were for #75.
It seems that there is some bug in
IsTabVisible
andMakeTabVisible
methods.I have a tab control with many tabs. When the app starts, I for example set the last tab active. It is selected properly, but it is not visible (i.e. the tabs control is not scrolled). So I try to use the following code to make it visible:
In my app this call to
IsTabVisible
returnstrue
even though the tab is not currently visible.I've also created a demo where there is nothing else except a tab control and many tabs. There the
IsTabVisible
correctly detects that the active tab is not visible, howeverMakeVisible
does nothing..In both cases I have only the following options set: