如何修正原点对话框的宽度和高度 [英] how to fix width and height of primefaces dialogbox

查看:145
本文介绍了如何修正原点对话框的宽度和高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Web应用程序中,我想以对齐框出现的方式来修正原点对话框的高度和宽度,如果想要最小化窗口,那么对话框也应该被最小化。
我的意思是我的框架之一不是整个窗口。

In my web application i want to fix height and width of primefaces dialogbox in the way in which the dialogbox appears exactly in the middle of my web page, and if one want to minimize the window then the dialogbox should also be minimised. i mean middle of my one of the frame not whole window.

即动态大小的对话框,如%width和height

i.e. dynamic sized dialog box like % width and height

感谢任何帮助...

推荐答案

您可以使用以下代码使其成为固定维度,

You can use following code to make it of fixed dimension,

<p:dialog header="Modal Dialog" widgetVar="dlg2" modal="true" width="300" height="200">  
    <h:outputText value="This is a Modal Dialog." />  
</p:dialog>    

并使功能最小化。您可以使用javascript来完成。

and to make minimize functionality. you can play with javascript to get it done.

另请参阅

  • Primefaces Show case

这篇关于如何修正原点对话框的宽度和高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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