我有以下TForm1
带有两个按钮(BitBtn
)的示例表单:
此外,我还有第二种形式TForm2
,它是从第一种形式派生的。第二个按钮向左移动并添加了另一个按钮:
在运行时(Windows 7),第二种形式如下所示:
如果我将字体缩放比例更改为 125%,我的表单如下所示:
不知何故,新按钮的位置和大小都错误。 我能做些什么呢?
我使用了以下.dfm
文件(缩短):
object Form1: TForm1
Left = 0
Top = 0
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object BitBtn1: TBitBtn
Left = 8
Top = 8
Width = 105
Height = 105
Caption = 'BitBtn1'
end
object BitBtn2: TBitBtn
Left = 359
Top = 8
Width = 105
Height = 105
Caption = 'BitBtn2'
end
end
inherited Form2: TForm2
Caption = 'Form2'
PixelsPerInch = 96
TextHeight = 13
inherited BitBtn2: TBitBtn
Left = 191
Top = 7
ExplicitLeft = 191
ExplicitTop = 7
end
object BitBtn3: TBitBtn
Left = 359
Top = 8
Width = 105
Height = 104
Caption = 'BitBtn3'
end
end
类文件在设计器生成时保持不变。它们不包含相关代码。