no refresh on changing form.height

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #37952
    Siegbert
    Participant

    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

    #58408
    Support
    Keymaster

    Hello!

    Can you upload a Dfm-file for this form?

    I will try to repeat and solve the issue.

    #58446
    Siegbert
    Participant
    '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

    #58470
    Support
    Keymaster

    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.

    #58509
    Siegbert
    Participant
    '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

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.