Skip to content

Commit

Permalink
Correct BeveledLabel position on UninstallProgressForm.
Browse files Browse the repository at this point in the history
Delphi 11.3 has problems positioning anchored controls correctly if they are resized while the form has no handle. Here, the form had no handle while BeveledLabel.Caption was being assigned because TSetupForm.Create's Position property change triggers a RecreateWnd. Setting Position in the .dfm avoids that RecreateWnd.

Later (not 6.4), the same change should be made to all of Setup's forms. It was only being set in code because D2 wouldn't write it in the .dfm.
  • Loading branch information
jordanrussell authored Jan 14, 2025
1 parent c6479e9 commit 1eaec50
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Projects/Src/Setup.UninstallProgressForm.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ object UninstallProgressForm: TUninstallProgressForm
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
Position = poDesigned
Scaled = False
DesignSize = (
497
360)
PixelsPerInch = 96
TextHeight = 13
object FBevel: TBevel
Left = 0
Expand Down

3 comments on commit 1eaec50

@martijnlaan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Is this the same issue as for which I added this workaround a while ago:

for I := 0 to OuterNotebook.PageCount-1 do

And if so, does it need a cleaner fix?

This code is also present in IDE.Wizard.WizardForm.pas.

@jordanrussell
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's different. This issue seems to have been introduced in Delphi 11 (or 10.4?). I added a workaround to SelectFolderForm as well (the tree view control was the wrong size), and in that case, confirmed that it first started in IS 6.3.

I suspect this issue is also what's causing the form designer to change the widths of right-anchored controls every time a form is opened. Hopefully Delphi 12 has a fix.

@martijnlaan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK thanks 👍

Please sign in to comment.