2014-02-06 80 views
2

我使用Inno Setup创建了一个安装程序,并且我更改了许可证页面而不是显示许可证,而是改为链接到它。我还添加了一个StaticText来显示一些文本,问题是当我添加太多文本时,我需要WordWrap:= true和AutoSize:= false,这使得在Setup中创建的StaticText宽度非常小。为什么它的大小如果AutoSize = false?当WordWrap = true时,该如何防止它最小化。改变父母?Inno setup WordWrap和Autosize

procedure InitializeWizard; 
var 
FormButton: TNewButton; 
Page: TWizardPage; 
ComboBox: TNewComboBox; 
begin 
    WizardForm.LicenseAcceptedRadio.Hide; 
    WizardForm.LicenseNotAcceptedRadio.Hide; 
    LicenseContextText := TNewStaticText.Create(WizardForm.InnerPage); 
    with LicenseContextText do 
    begin 
    Parent := WizardForm.InnerPage; 
    //TODO: check if we need 
    Left := ScaleX(250); 
    Top := ScaleY(50); 
    Height := ScaleY(100); 
    Width := ScaleX(1000); //200; 
    //Color := clBlack; 
    Font.Color := clGray; 
    //WordWrap := true; 
    //AutoSize := false; 
    Caption := 'Some content text, Some content text, Some content text';// 
    Visible := false; 
    end; 
    LicenseLinkLabel := TNewStaticText.Create(WizardForm.InnerPage); 
    with LicenseLinkLabel do 
    begin 
    Parent := WizardForm.InnerPage; 
    //TODO: check if we need 
    Left := 340; 
    Top := 240; 
    Height := 100; 
    Cursor := crHand; 
    Font.Color := clBlue; 
    Font.Style := [fsUnderline]; 
    Caption := 'the License Agreement'; 
    OnClick := @LicenseLinkLabelClick; 
    Visible := false; 
    end; 
    LicenseLinkURL := TNewCheckBox.Create(WizardForm.InnerPage); 
    with LicenseLinkURL do 
    begin 
    Parent := WizardForm.InnerPage; 
    Left := 277; 
    Top := 238; 
    Width := 60; 
    Caption := ' I accept'; 
    OnClick := @OnLicenseCheckBoxClick; 
    Visible := false; 
    end; 
end; 

procedure CurPageChanged(CurPageID: Integer); 
begin 
if (CurPageID = wpLicense) then 
begin 
    WizardForm.Bevel1.Visible := false; 
    WizardForm.MainPanel.Visible := false; 
    WizardForm.InnerNotebook.Visible := false; 
    LicenseLinkLabel.Visible := true; 
    LicenseLinkURL.Visible := true; 
    LicenseContextText.Visible := true; 
+0

..所以你的问题是什么? – stuartd

回答

2

您设置WidthHeight属性之前设置AutoSizeWordWrap性能。

这是不相关的,但也不是硬编码的大小,您可能需要考虑使用相对于WizardForm中的现有元素的大小的具体值,例如。让它自动适应表单内页面区域的宽度。

+0

Tnx很多!我仍然认为delphi编译器的脚本,我的坏( – mishander