Closed charlesw closed 3 years ago
I've had a bit more of a look into this appears to be occurring as Toolbar that renders the tabs will only render the tabs that intersect with the current clipping rectangle. While this makes sense something changed since 2.4.8 (the last version we used) which means that when the active tab is changed the inactive ones aren't rendered resulting in blank background being displayed in their place.
I've managed to work around the issue by forcing a full invalidation when the active tab changes by calling TSpTBXTabToolbar.InvalidateNC rather than using View.InvalidatePosition & SetWinPos in TSpTBXTabToolbar.SetActiveTabIndex. According to the comments in the code this may cause flicker though we haven't noticed any in our specific circumstance.
Can't reproduce, tried your demo and it works fine. Can you try to reproduce it with TSpTBXStatusBar?
No I've only noticed it on the tabset. If you can't reproduce all I can think is it might be some interaction with vcl, we use Rad Studio 10.2.3, though it is odd that past releases were fine. Unfortunately I don't currently have access to 10.3 series so can't test it in that.
On Tue, 21 Jan 2020, 01:50 SilverpointDev, notifications@github.com wrote:
Can't reproduce, tried your demo and it works fine. Can you try to reproduce it with TSpTBXStatusBar?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SilverpointDev/sptbxlib/issues/54?email_source=notifications&email_token=AAB7HSBBQ7HTMI5TD46EOG3Q6W25FA5CNFSM4JTQDYHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJM4F7Y#issuecomment-576307967, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB7HSATTCS3F26N4ZED46LQ6W25FANCNFSM4JTQDYHA .
I have tested it with 10.2.3 Are you sure you applied the latest patch to TB2K?
Yes the latest version of the patch was applied to TB2K 2.2.2.
Just to be clear this is the kind of glitches I'm seeing:
I've also updated my forked repo\demo to reflect the latest code and can confirm it still occurs.
Can't reproduce it on your demo. Can you try this, change the following methods:
procedure TSpTBXTabToolbarView.BeginUpdate;
begin
inherited;
end;
procedure TSpTBXTabToolbarView.EndUpdate;
begin
inherited;
if (FUpdating = 0) and (Owner is TSpTBXTabToolbar) then
TSpTBXTabToolbar(Owner).InvalidateNC;
end;
Tried the change you suggested and it doesn't work, neither is BeginUpdate or EndUpdate ever called (in the demo)
Fixed in latest commit
Steps to reproduce:
Note that a Delphi example demonstrating the bug can be found here: https://github.com/charlesw/sptbxlib (see delphi project in Demos/SpTBXTabSetBug)
Other things to note: