views:

504

answers:

1

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?

A: 

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"&gt;
<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>
Caleb