Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6982915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:21:03+00:00 2026-05-27T18:21:03+00:00

I have a panel (bottom aligned) and some controls (client aligned). To animate the

  • 0

I have a panel (bottom aligned) and some controls (client aligned).

To animate the panel I use:

AnimateWindow(Panel.Handle, 1000, aw_hide or AW_SLIDE OR AW_VER_POSITIVE);
panel.Visible:=false;

In my case the panel smoothly hides and only then other controls take it’s space.

But I want that other controls move smoothly and simultaneously with the panel down.

For example, FireFox uses this effect.

Can anybody suggest me something useful? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:21:03+00:00Added an answer on May 27, 2026 at 6:21 pm

    AnimateWindow is a synchronous function, it will not return until the animation finishes. That means during the time specified in dwTime parameter, no alignment code will run and your ‘alClient’ aligned controls will stay still until the animation finishes.

    I’d suggest to use a timer instead. Just an example:

    type
      TForm1 = class(TForm)
        ..
      private
        FPanelHeight: Integer;
        FPanelVisible: Boolean;
    ..
    
    procedure TForm1.FormCreate(Sender: TObject);
    begin
      FPanelHeight := Panel1.Height;
      Timer1.Enabled := False;
      Timer1.Interval := 10;
    end;
    
    procedure TForm1.Button1Click(Sender: TObject);
    begin
      Timer1.Enabled := True;
      FPanelVisible := not FPanelVisible;
    end;
    
    procedure TForm1.Timer1Timer(Sender: TObject);
    const
      Diff: array [Boolean] of Integer = (-1, 1);
    begin
      Panel1.Height := Panel1.Height - Diff[FPanelVisible];
      Panel1.Visible := Panel1.Height > 0;
      Timer1.Enabled := (Panel1.Height > 0) and (Panel1.Height < FPanelHeight);
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have panel that is using group layout to organize some label. I want
I have a Panel and I am adding controls inside this panel. But there
I have stack panel with custom controls in it. I attach standard MouseDragElementBehavior to
I have stack panel with custom controls in it. User can add or remove
I have panel that I have customized. I use it to display text. But
I have two controls in div wrapped into update panel. My code requires for
I have a WindowsForm with a panel control which I use to display my
I have a form where controls are dynamically added to a Panel. However, when
I have a panel containing a DataGridView and 3 buttons at the bottom of
i have a panel in my winforms and in it i load some usercontrols

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.