当弹出窗口对于屏幕来说太大时,如何自动激活浏览器的垂直滚动?
我有一个 Flash 应用程序,它使用大量没有父容器的弹出标题窗口。当分辨率较小的用户尝试使用我的应用程序时,我遇到了问题,因为弹出实用程序窗口通常太大。
请注意,我不想重新调整窗口的大小,因为这会消除很多清晰度以及菜单栏和工具图标的分离。我只希望我的应用程序检测窗口的高度或宽度属性是否大于浏览器视图框架的高度或宽度属性,然后在需要时激活相应的滚动条。
任何关于我如何做到这一点的想法都值得赞赏。谢谢。
I have a flash application that utilizes a lot of popup title windows that do not have parent containers. I'm having a problem when users with smaller resolutions try to use my application because the popup utility windows will often be too large.
Note that I do not want to re-size the window as that would eliminate a lot of it's clarity and separation of menu bars and tool icons. I just want my application to detect if the window has a height or width property greater than that of the browser's view frame and then activate the respective scroll bar should it be needed.
Any thoughts on how I can do this are appreciated. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用稍微不同的方法。在弹出类的
creationComplete
中,根据屏幕的高度 (Capability.screenResolutionY
) 设置面板的高度。这将导致面板上的内置滚动条在需要时被触发。如果您当前使用内置弹出窗口实用程序(例如Alert
),则需要创建自己的自定义弹出窗口类。Use a slightly different approach. In the
creationComplete
for your popup class, set the panel's height based on the screen's height (Capabilities.screenResolutionY
). This will cause the built-in scrollbars on your panel to be triggered when needed. If you're currently using a built-in popup utlity (e.g.Alert
), you'll need to create a custom popup class of your own.我最终屈服了,并认为尝试强制我的应用程序使用浏览器的滚动是糟糕的设计。现在,如果弹出窗口太大,它会调整大小以适应并强制在 TitleWindow 或组件上滚动。
I eventually caved and decided that it was bad design to try and force my application to use the browser's scrolling. Now if the pop-up is too large it resizes to fit and forces scrolling on the TitleWindow or component instead.