在 Inno Setup 中更改自定义页面的大小

发布于 2024-10-09 06:03:43 字数 389 浏览 1 评论 0原文

下图显示了标准自定义页面的大小:

http://img232.imageshack。 us/img232/8449/imagejp.png

我特意删除了顶部的面板,您通常会在其中看到 CaptionDescriptionLogo< /代码>。所以你可以看到页面的实际尺寸相当小——顶部、左侧和右侧都有间隙。有什么办法可以调整页面大小,从而没有间隙吗?我希望图像占据整个空间。

我使用 CreateCustomPage 函数创建页面。

The following image shows the size of a standard custom page:

http://img232.imageshack.us/img232/8449/imagejp.png

I've intentionally removed the panel on top, where you usually see Caption, Description and Logo. So you can see that the actual size of the page is quite small - there are gaps on top, left and right sides. Is there any way to resize the page, so there are no gaps? I want the image to take the whole space.

I create the page using CreateCustomPage function.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

若能看破又如何 2024-10-16 06:03:43

如果您想完全控制 Inno Setup 向导中的某一页面,则需要使用 CreateCustomForm 函数而不是 CreateCustomPage

正如我在评论中提到的,CreateCustomPage 保留基本模板的边距和其他元素,以获得一致的外观和感觉。这就是 Inno Setup 的魅力所在 — 使用标准化且美观的 UI 创建简单的设置向导是多么容易。但是,如果您确定要覆盖此设置,那么它确实是一个选项。 CreateCustomForm 将允许您按照自己的意愿布置表单。

请记住,如果您要创建自己的欢迎页面,您可能还需要确保已跳过显示默认欢迎页面!

If you want complete control over one of the pages in an Inno Setup wizard, you'll need to use the CreateCustomForm function instead of CreateCustomPage.

As I mentioned in a comment, CreateCustomPage retains the margins and other elements of the base template for a consistent look and feel. That's part of the charm to Inno Setup—how easy it is to create simple setup wizards with a standardized and nice-looking UI. If you're sure that you want to override this, however, it is indeed an option. CreateCustomForm will allow you to lay out the form however you wish.

Remember that if you're creating your own welcome page, you'll probably also want to make sure that you've skipped showing the default welcome page!

猫腻 2024-10-16 06:03:43

所以我发现这可以很容易地完成:

// 创建自定义页面
mainPage := CreateCustomPage(wpSelectTasks, '', '');
mainPage.Surface.Notebook.SetBounds(0, 0, WizardForm.ClientWidth, ScaleY(260));

但请注意,此代码也会影响其他向导页面,因此您需要在切换页面时将笔记本边界更改为旧值,或者需要在这些受影响的页面上重新定位控件(或跳过它们)。

这个答案 还更改了向导页面的范围。

So I have discovered this can be done quite easily:

// Create custom page
mainPage := CreateCustomPage(wpSelectTasks, '', '');
mainPage.Surface.Notebook.SetBounds(0, 0, WizardForm.ClientWidth, ScaleY(260));

But be aware this code affects other wizard pages as well, so you either need to change the notebook bounds to the old values when you switch pages, or you need to reposition controls on these affected pages (or skip them).

This SO answer is also changing bounds of wizard pages.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文