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

  • SEARCH
  • Home
  • 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 8594797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:16:53+00:00 2026-06-12T00:16:53+00:00

In my program I have a custom TPanel that slides out from above and

  • 0

In my program I have a custom TPanel that slides out from above and has buttons and images on it. It slides out fine but when I go to hide it, it is very slow. I have tried several methods and all are the same result. If you notice below I tried Redraw thinking I could just redraw the trailing rect but this call redraws the entire form as does all the other methods I have tried. I even tried using scroll. Am I calling it wrong or is there a better way to just update the form part that needs updating as the panel moves up?

while z>mypanels[panel].Fstarttop do
begin
   if z-x<mypanels[panel].Fstarttop then z:=mypanels[panel].Fstarttop else z:=z-x;
   updaterect:=Rect(mypanels[panel].left,z+mypanels[panel].height,mypanels[panel].left+mypanels[panel].width,mypanels[panel].top+mypanels[panel].height);
   mypanels[panel].top:=z;
   //mypanels[panel].Repaint;
   //Application.ProcessMessages;  
   //mypanels[panel].ScrollBy(0,-x);
   //InvalidateRect(form1.Handle,@updaterect,FALSE);
   //Application.ProcessMessages;
   //RedrawWindow(form1.Handle,@updaterect, 0, RDW_UPDATENOW);
   //form1.refresh;
end;
  • 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-06-12T00:16:54+00:00Added an answer on June 12, 2026 at 12:16 am

    Moving a panel should not take long. Also, to update the parent of the panel, a call to Form.Update should be just fine. To force a redraw of only a portion of a form, a call to InvalidateRect should do, as you have already done (try clearing the background though).

    Possible reasons for the delay and/or smudging are:

    • you do some extensive own drawing in Form.OnPaint,
    • Anchors, Align, and/or Constraints of panel and/or form are contradicting or result in a chain-reaction (in this case, try DisableAlign and EnableAlign),
    • the form is not the immediate parent of the panel,
    • the panel is over some other control,
    • your updaterect variable is the new rectangle instead of the previous one,
    • something else in your code and/or calling routine,
    • any combination of the above.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program where a UITableView contains custom cells loaded from nibs. These
I have program that requires Python 3, but I develop Django and it uses
I have program that has a variable that should never change. However, somehow, it
We have a custom built program that needs authenticated/encrypted communication between a client and
I have a search program that has multiple input text boxes that correspond to
The problem: I have a custom collection PagedList<T> that is being returned from my
I want to create a custom control derived from TPanel that contains an image
I have a custom authorize program called CustomAuthorize that inherits AuthorizeAttribute that simply restricts
I have some custom user controls in my .net winforms program that do not
In a small program that I have, I'm trying to have custom containers for

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.