在 Inno Setup 中更改自定义页面的大小
下图显示了标准自定义页面的大小:
http://img232.imageshack。 us/img232/8449/imagejp.png
我特意删除了顶部的面板,您通常会在其中看到 Caption
、Description
和 Logo< /代码>。所以你可以看到页面的实际尺寸相当小——顶部、左侧和右侧都有间隙。有什么办法可以调整页面大小,从而没有间隙吗?我希望图像占据整个空间。
我使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想完全控制 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 ofCreateCustomPage
.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!
所以我发现这可以很容易地完成:
但请注意,此代码也会影响其他向导页面,因此您需要在切换页面时将笔记本边界更改为旧值,或者需要在这些受影响的页面上重新定位控件(或跳过它们)。
这个答案 还更改了向导页面的范围。
So I have discovered this can be done quite easily:
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.