Dijit.Dialog 1.4,无论我设置什么尺寸,设置尺寸都限制为600x400

发布于 2024-08-28 02:46:24 字数 438 浏览 5 评论 0原文

我正在尝试设置 dijit.Dialog 的大小,但无论我设置它的大小,它似乎仅限于 600x400。我已经从 dojocampus 复制了代码,并且出现了对话框,但是当我将尺寸设置得更大时,它只显示 600x400。使用 firebug 并选择对话框内的项目,我发现它们比对话框大,但显示不正确。我将其设置为滚动,但滚动条的底部看不到。在 firebug 中,我检查了 _Widget 的 maxSize 并将其设置为无穷大。这是我设置对话框的代码。

    <div id="sized" dojoType="dijit.Dialog" title="My scrolling dialog">
        <div style="width: 580px; height: 600px; overflow: scroll;">

对于增大对话框大小有什么建议吗?

I'm trying to set the size of a dijit.Dialog, but it seems limited to 600x400, no matter what size I set it. I've copied the code from dojocampus and the dialog appear, but when i set the size larger, it only shows 600x400. Using firebug and selecting items inside the dialog, I see that they are larger than the dialog, but don't show correctly. I set it up to scroll, but the bottom of the scrollbar is out of view. In firebug, I've check the maxSize from _Widget and it is set to infinity. Here is my code to set the dialog.

    <div id="sized" dojoType="dijit.Dialog" title="My scrolling dialog">
        <div style="width: 580px; height: 600px; overflow: scroll;">

Any suggestions for sizing the dialog box larger?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暮光沉寂 2024-09-04 02:46:24

我刚刚使用 dojo 1.4 从头开始​​编写了一个快速示例,并且能够毫无问题地设置任意大的 DBX 大小。

如果不查看代码,可能很难找到问题的根源,但这似乎并不是 dojo 工具包的固有限制。也许您有一些 CSS 规则以您没有预料到的方式继承?

也许您可以使用我下面的示例与您的用例进行比较,并找出您的实现有何不同。

<!DOCTYPE html PUBLIC
    "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title>test</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script src="http://www.google.com/jsapi" type="text/javascript"></script>
        <script type="text/javascript">
            djConfig = {
                    parseOnLoad: true
                };
            google.load("dojo", "1.4");
            google.setOnLoadCallback(function (){
                    dojo.require("dijit.Dialog");
                    dojo.require("dijit.form.Button");
                });
        </script>
        <style type="text/css">
                @import "http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/resources/dojo.css";
                @import "http://ajax.googleapis.com/ajax/libs/dojo/1.4/dijit/themes/tundra/tundra.css"; 
        </style>
    </head>
    <body class="tundra">
        <button dojoType="dijit.form.Button" type="button">Show big Dialog
            <script type="dojo/method" event="onClick" args="evt">
                dijit.byId("bigdbx").show();
            </script>
        </button>
        <div id="bigdbx" dojoType="dijit.Dialog" title="Big Dialog" width="900px">
            <p style="width: 1100px; height: 800px;">Paragraph with really wide fixed size...</p>
        </div>
    </body>
</html>

I just coded up a quick sample from scratch using dojo 1.4 and was able to set an arbitrarily large DBX size with no problems.

Without seeing your code it might be hard to find where your issue is stemming from but it does not seem to be an inherent limitation of the dojo toolkit. Perhaps you have some CSS rules that are inherited in a way you did not anticipate?

Perhaps you can use my sample below to compare with your use case and figure out what is different about your implementation.

<!DOCTYPE html PUBLIC
    "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title>test</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script src="http://www.google.com/jsapi" type="text/javascript"></script>
        <script type="text/javascript">
            djConfig = {
                    parseOnLoad: true
                };
            google.load("dojo", "1.4");
            google.setOnLoadCallback(function (){
                    dojo.require("dijit.Dialog");
                    dojo.require("dijit.form.Button");
                });
        </script>
        <style type="text/css">
                @import "http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/resources/dojo.css";
                @import "http://ajax.googleapis.com/ajax/libs/dojo/1.4/dijit/themes/tundra/tundra.css"; 
        </style>
    </head>
    <body class="tundra">
        <button dojoType="dijit.form.Button" type="button">Show big Dialog
            <script type="dojo/method" event="onClick" args="evt">
                dijit.byId("bigdbx").show();
            </script>
        </button>
        <div id="bigdbx" dojoType="dijit.Dialog" title="Big Dialog" width="900px">
            <p style="width: 1100px; height: 800px;">Paragraph with really wide fixed size...</p>
        </div>
    </body>
</html>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文