- This topic has 4 replies, 2 voices, and was last updated 6 years ago by Siegbert.
-
AuthorPosts
-
September 23, 2018 at 12:52 pm #37952SiegbertParticipant
Hello,
I have a form with some TsRolloutPanels on a PageControl and below the pageControl there is a panel with two buttons. On Change of PageControl-Tab my application resizes the window so that all TsRolloutPanels fit optimal.
My Code works in the OnChange-event of the PageControl and calculates the new form.heigt as sum of all components as PageHeight and set it with form.heigt:=PageHeight.
If I set SkinManager.active=false all works fine (see screen1_OK and screen2_OK).
If I activate skinManager all works fine only if the form.height changes to a higher value (see screen1_Skinned_OK). But changing to a smaller window (screen2) does not repaint the panel below the pageControl (see screen2_skinned_Error). If I resize the window manually with mouse, the panel will be repainted. Only setting form.height in the code does not repaint the panel.
This is my Code for calculating the height of the form:
Code:procedure TfrmSettings.SetWindowHeight;
var
i: Integer;
temp: TComponent;
PageHeight: Integer;
begin
PageHeight := 0;
for i := ComponentCount – 1 downto 0 do
begin
Temp := Components;
if (temp is TsRolloutPanel) and (TsRolloutPanel(temp).Parent = pcSettings.ActivePage) then
PageHeight := PageHeight + TsRolloutPanel(temp).Height + 5;
end;
frmSettings.Height := PageHeight + sPanelBottom.Height+70;
end;Even if I do a frmSettings.refresh or frmSettings.repaint it will not work.
Is there any mistake in the way I do it? With skinManager.active=false it works, so I think it will be generally correct.
Did anyone know a solution?
Thanks,
Siegbert
Delphi 2010, AlphaControls 12.14
same error with AlphaControls 13.19
September 25, 2018 at 6:57 am #58408SupportKeymasterHello!
Can you upload a Dfm-file for this form?
I will try to repeat and solve the issue.
October 7, 2018 at 3:06 pm #58446SiegbertParticipant'Support' wrote:Hello!
Can you upload a Dfm-file for this form?
I will try to repeat and solve the issue.
Hello,
here are dfm and pas – file (see zip – I'm not allowed to upload a dfm-file).
I hope you can use it to repeat the error because the form has many DBFields.
If you can't use this dfm give me a short response and I will create a dfm with only standard-fields without DB-access.
Siegbert
October 13, 2018 at 5:37 am #58470SupportKeymasterHello
Thank you for files. As a quick solution, you can disable an animation of pages changing: change the sSkinManager1.AnimEffects.PageChanging.Active to False.
I will try to find a solution for active animation.
October 20, 2018 at 7:29 am #58509SiegbertParticipant'Support' wrote:Hello
Thank you for files. As a quick solution, you can disable an animation of pages changing: change the sSkinManager1.AnimEffects.PageChanging.Active to False.
I will try to find a solution for active animation.
Thank you, this quick solution works fine for the moment.
Siegbert
-
AuthorPosts
- You must be logged in to reply to this topic.