如何减少Inno Setup TInputQueryWizardPage(CreateInputQueryPage)上两个输入框之间的行距 [英] How to reduce the line spacing between two input boxes on Inno Setup TInputQueryWizardPage (CreateInputQueryPage)

查看:188
本文介绍了如何减少Inno Setup TInputQueryWizardPage(CreateInputQueryPage)上两个输入框之间的行距的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个TInputQueryWizardPage页面,其中包含8个用户输入. 向导页面已增加,但所有值仍然不可见.有没有办法减小两个值之间的行距,以便所有值都以当前向导的大小显示?

I have a TInputQueryWizardPage page with 8 user inputs. The wizard page has been increased but still all the values are not visible. Is there a way to reduce the line spacing between two values so that all the values will be displayed with the current wizard size?

推荐答案

使用TInputQueryWizardPage.EditsTInputQueryWizardPage.PromptLabels访问控件并根据需要重新放置它们:

Use TInputQueryWizardPage.Edits and TInputQueryWizardPage.PromptLabels to access the controls and re-locate them as you need:

[Code]

procedure ReducePromptSpacing(Page: TInputQueryWizardPage; Count: Integer; Delta: Integer);
var
  I: Integer;
begin
  for I := 1 to Count - 1 do
  begin
    Page.Edits[I].Top := Page.Edits[I].Top - Delta * I;
    Page.PromptLabels[I].Top := Page.PromptLabels[I].Top - Delta * I;
  end;
end;

procedure InitializeWizard();
var
  Page: TInputQueryWizardPage;
begin
  Page := CreateInputQueryPage(wpWelcome,
    'Personal Information', 'Who are you?',
    'Please specify your name and the company for whom you work, then click Next.');

  Page.Add('Prompt 1:', False);
  Page.Add('Prompt 2:', False);
  Page.Add('Prompt 3:', False);
  Page.Add('Prompt 4:', False);
  Page.Add('Prompt 5:', False);

  ReducePromptSpacing(Page, 5, ScaleY(10));
end;

标准布局:

间距减少10个像素的布局:

Layout with the spacing reduced by 10 pixels:

这篇关于如何减少Inno Setup TInputQueryWizardPage(CreateInputQueryPage)上两个输入框之间的行距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆