showmodalDialog(); [英] showmodalDialog();

查看:58
本文介绍了showmodalDialog();的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在我的项目中使用的是modalDialog,它是动态生成的,我想根据屏幕分辨率的不同将高度和宽度分别设置为80%(高度应比分辨率小80%,并且相同宽度).

但是,以像素为单位而不是以%为单位,请提出一些解决方案.

Hi all,

I''m using a modalDialog in my project which I''m generating dynamically and I want to set the height and width to 80% each depending on whatsoever the screen resolution is,(height should be 80% less than the resolution and same with the width).

However it''s taking both in pixel units instead of taking in % please suggest some solution.

Thanks in Advance.

推荐答案

为什么不获取高度/宽度,然后您自己在内部使用百分比计算新的高度/宽度,然后应用它们呢?

如果没有百分比支持,您可以随时使用百分比并获取所需的值来设置.
Why not get the Height/Width and then you yourself calculate the new height/Width internally using percentages and then apply them?

If percentage support is not there you can always use the percentage and get the desired values to set.


这篇关于showmodalDialog();的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆