Jump to content
Lajos Juhász

A nice scaled false bug in Delphi 11 update 1

Recommended Posts

1.) Create a new application.

2.) Set scaled false for the main form, set it's width to 100x100

3.)  Run the application.

 

Delphi will ignore the size of the from inside the DFM and will display the default 640x480 form. I cannot check the QP portal as I cannot log into.

 

I admit this is a perfect tool to check whenever you have somewhere scaled false but also quite an interesting bug.  Examine the DFM there is no With or Height for the form:

 

object Form1: TForm1
  Left = 0
  Top = 0
  Caption = 'Form1'
  ClientHeight = 61
  ClientWidth = 84
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -12
  Font.Name = 'Segoe UI'
  Font.Style = []
  Scaled = False
  OnActivate = FormActivate
  PixelsPerInch = 96
  TextHeight = 15
  object Label1: TLabel
    Left = 33
    Top = 43
    Width = 34
    Height = 15
    Caption = 'Label1'
  end
end

 

Add those properties to the DFM and save it. Run the program the form is displayed correctly. Display the form again (Alt + F12) execute the application Width and Height are deleted from the DFM and again the form will ignore the ClientHeight/ClientWidth properties.

 

 

 

Share this post


Link to post
33 minutes ago, Lajos Juhász said:

Examine the DFM there is no With or Height for the form

Width and Height are not stored for a form, haven't been for a long time. ClientWidth and ClientHeight are.

Edited by dummzeuch

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×