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 7748499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:48:03+00:00 2026-06-01T10:48:03+00:00

if (in Delphi) I do Panel1.ManualFloat(Rect(500,500,600,600)); the panel is floated not at the specified

  • 0

if (in Delphi) I do

Panel1.ManualFloat(Rect(500,500,600,600));

the panel is floated not at the specified Rect location, but instead in a sort of windows default location. How do I get a panel (or other control) to float at a specified location. It does seem to have the correct shape however. Is there some other property I need to set to make it work correctly?

Edit: Just to make things clear. I would expect the above code to make the panel a 100×100 square located at (500×500) relative to the top left hand corner of the screen, which it doesn’t. The shape is correct but location is not. If subsequent controls are floated they are cascaded down the screen.

Edit2: This doesn’t seem to be a problem in Delphi 7, but is in Delphi 2007 through XE2 (and possibly earlier)

  • 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-01T10:48:05+00:00Added an answer on June 1, 2026 at 10:48 am

    Don’t look further: Its a bug in the VCL.

    ManualFloat creates a floating window and sets its Top, Left values in TControl.CreateFloatingDockSite(Bounds: TRect) and later sets its ClientWidth.

    That is a mistake because doing that forces the WindowHandle creation (it didn’t have a Handle yet) in

    function TCustomForm.GetClientRect: TRect;
    begin
      if IsIconic(Handle) then // <===
    

    And that calls the default positioning of the Window (cascading yadda yadda…) resetting the Top and Left

    The fix would be to set the ClientWidth and ClientHeight before setting the Top and Left properties in TControl.CreateFloatingDockSite(Bounds: TRect)

    Update: the fixed code in Controls.pas

    function TControl.CreateFloatingDockSite(Bounds: TRect): TWinControl;
    begin
      Result := nil;
      if (FloatingDockSiteClass <> nil) and
        (FloatingDockSiteClass <> TWinControlClass(ClassType)) then
      begin
        Result := FloatingDockSiteClass.Create(Application);
        with Bounds do
        begin
          // Setting Client area can create the window handle and reset Top and Left
          Result.ClientWidth := Right - Left;
          Result.ClientHeight := Bottom - Top;
          // It is now safe to position the window where asked
          Result.Top := Top;
          Result.Left := Left;
        end;
      end;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Executing Control Panel Items , MSDN says this: Windows Vista Canonical Names In
Windows 7 has added on its Control Panel, Appearance and Personalization, Display setting, an
Delphi documentation says that Debug information [...] it does not affect the size or
In Delphi XE, how to make the Messages panel to disappear after I successfully
Is there a sliding (animated) panel component for Delphi? For instance it can be
I've been playing around with the Category Panel Control inside Delphi 2010. I've been
Delphi does not yet support building 64-bit applications. What common tools are there for
Im looking for a delphi component that looks and functions like the Windows 7
Delphi 2009 has changed its string type to use 2 bytes to represent a
Delphi (and probably a lot of other languages) has class helpers. These provide a

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.