-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visible and Minimized #70
Comments
Moved second part to issue #74 - it is not connected with OnShow, it always redraws window header. |
Cannot be reproduced anymore. Possibly fixed by the changes that were made for issue 74. Could you please test again and check if this still occurs? |
Nothing changed. See example project and screenshot. |
Second project - ribbon set as minimized at OnCreate, but showed maximized after button click. |
Okay, with the sample projects I can reproduce it. The reason that the ribbon is shown maximized, if Minimized is set to true in OnCreate, is that the ribbon is not yet initialized. You should move calls like that to the "OnLoaded" event of the ribbon. A bit more problematic is the black bar, where the ribbon is supposed to be. This occurs when the ribbon is minimalized, without it ever having been visible before.
are moved to OnLoaded, we still get the black bar. I think the framework cannot handle setting the ribbon to minimized, without it having been drawn already, once before. I don't think there is much we can do to fix this. This seems to be caused by the framework itself, not by the Delphi wrapper...
|
Ok, I see. Is it possible to add Application.ProcessMessages to SetMinimized function to suppress this error? |
Would it be possible to save this information in a member variable? |
…hen the first paint message was processed by the ribbon. Until then, the "Minimize" operations are postponed (Fixes issue #70)
I have added a new enum TUIRibbonState, which is now used to mark the time that the first paint message was processed by the ribbon. The call to "Minimize" will be postponed until the first paint message has been handled. This should fix this problem. Thx @joachimmarder for the suggestion! |
Setting ribbon.visible := true also internally resets ribbon.minimized to false.
I can set it again to minimized after setting visible, but it causes flickering of ribbon - first it draws maximized and then switched to minimized.
Also setting of ribbon.visible := false at form.OnShow hides ribbon, but window header then showed with black color. Not a problem - I can move it to OnCreate, but it is not obvious.
The text was updated successfully, but these errors were encountered: