动态添加自定义页面(在运行时)
我正在使用 NSIS 安装程序脚本语言编写安装脚本。我有一些可以轻松加载的自定义页面,但我想知道是否可以动态插入页面。我想要做的是有一个页面,上面有其他配置选项,底部有一个复选框,上面写着“添加更多设置”或类似的内容。如果选中该复选框,它将显示另一个自定义页面,该页面与第一个页面完全相同。只要用户继续选中该复选框,就应该显示更多页面。有没有某种方法可以一遍又一遍地回收同一页面?我真的不认为我应该需要生成一个全新的页面,因为它只是一次又一次相同的页面,但我不确定如何在运行时显示同一页面的新实例。快速谷歌和 stackoverflow 搜索并不能保证任何结果。
谢谢你们。
I'm writing an install script utilizing the NSIS installer scripting language. I have a few custom pages that I am able to load without hassle, but I was wondering if it would be possible to insert pages dynamically. What I want to do is have a page with additional configuration options on it and on the bottom have a checkbox that says "Add more settings" or something similar. If the checkbox is ticked, it will show another custom page that's an exact copy of the first one. As long as the user keeps checking the checkbox, more pages should be shown. Is there some method of recycling the same page over and over again? I really don't think I should need to generate a whole new page because it's just the same page again and again, but I'm not sure how to show a new instance of the same page during runtime. A quick Google and stackoverflow search did not warrant any results.
Thanks guys.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
页数在编译时是固定的。
如果您需要不同的“隐藏”页面或仅同一页面的几个实例,我想说您应该在页面创建回调中通过调用 abort 来跳过页面,但如果页面计数,这将不起作用是无限的。
也可以直接进入页面:
The number of pages is fixed at compile time.
If you need different "hidden" pages or just a couple instances of the same page I would say that you should just skip the pages when required in the create callback for the page by calling abort but this is not going to work if the page count is unlimited.
It is also possible to go directly to a page: