当窗口调整为最小尺寸时(在Inno Setup上),TLabel控件会在自定义页面上裁剪

安德鲁·特拉克(Andrew Truckle)

TLabel在自定义页面上定义了这个

{ lblPromptMode (TLabel) }
lblPromptMode := TLabel.Create(pageAutoBackup);
lblPromptMode.Parent := pnlBackupMode;
lblPromptMode.Enabled := True;
lblPromptMode.Visible := True;
lblPromptMode.Top := radBackupModeManual.Top + radBackupModeManual.Height + ScaleY(10);
lblPromptMode.Width := pnlBackupMode.Width;
lblPromptMode.Font.Color := $000000;
lblPromptMode.Color := $F0F0F0;
lblPromptMode.Caption := ExpandConstant('{cm:lblPromptMode}');

我现在正在对页面进行本地化,并在添加荷兰语翻译时遇到一个查询。

显示窗口时,实际上看起来不错(我正在脚本中使用现代样式设置):

现代风格

但是,如果我将窗口的大小调整为最小:

最小尺寸

如您所见,现在已裁剪了此控件。我们可以(并且应该)以任何方式解决此问题吗?

马丁·普里克里(Martin Prikryl)

There's no easy way to solve this. While you can set the label to wrap, if it is too long (TLabel.WordWrap), you would have to reserve space for two lines on the dialog. That would would not look good with shorter translations, as it disconnects the label from the control.

Implementing the page in a way that it would automatically expand the label to two lines, when needed only, is lot of work and not usual in classic Windows applications.

I'd recommend you to:

  • shorten the text to fit the minimal window;
  • or increase the minimal windows size to fit the text (WizardForm.Constraints.MinWidth);
  • 或将文本拆分为组合框上方的较短标签,并在组合框下方将其他详细信息添加到另一个标签-如果您仍需要在包装中保留两行,则可以保留两行的空间-控件下方的未使用的可用空间是可以的,但不在控制范围之内。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Inno Setup在自定义页面上放置图像/控件

在Inno Setup的自定义页面上在控件后面显示背景

如何在Inno Setup中将自定义页面上的单选控件分成两个不同的组?

在Inno Setup中,FinishedPage上未显示自定义TLabel

在Windows 7-Parallels(Inno脚本)上,自定义向导页面上控件的颜色不正确

Inno Setup在自定义文件夹选择页面上显示安装所需的空间

为什么在Inno Setup中未选中自定义页面上的单选按钮?

Inno Setup-使用进度条在自定义页面上复制文件

自定义选项页面上现有单选按钮的Inno Setup更改标题

禁止 Inno Setup 自定义页面上的空白和仅空格输入

为每个页面自定义控件

在Inno Setup中将控件宽度设置为自定义页面SurfaceWidth的一半无法正常工作

在Inno Setup中单击“下一步”按钮时,验证自定义页面上的数据

Inno Setup 安装中的按钮被裁剪,自定义消息显示为乱码(日语)

Inno Setup安装程序中的嵌入式CMD(在自定义页面上显示命令输出)

使用Google Map的Inno Setup自定义页面

Inno Setup-自定义安装页面

Inno Setup:自定义页面选择更新或删除/卸载

Inno Setup的自定义页面向导

安装后执行批处理文件,并在Inno Setup中“完成”页面之前的自定义页面上显示其输出

自定义控件不会在最小化时获取MouseLeave事件

如何防止自定义用户控件上的各个控件散开(并仍然允许调整大小)

Inno Setup - 如何在自定义卸载页面中创建新的卸载页面?

最小化 WordPress 相同代码不同页面上的自定义 CSS

在WooCommerce单一产品页面上为特定产品添加自定义内容

Inno Setup:自定义类

Inno Setup:创建自定义表单

WooCommerce - 产品变化 - 自定义裁剪尺寸

从命令行设置Inno Setup自定义页面字段的值