[Dojo-interest] Re: How to set style for a widget from JS code

Rhapidophyllum rhapidophyllum at cox.net
Wed Feb 28 10:14:11 MST 2007


You can also look at:

dojo.html.setStyle
dojo.html.setStyleAttributes


On Feb 28, 2007, at 11:25 AM, Olivier THIERRY wrote:

> Just to say I found how to do it ... You just have to use standard  
> DHTML !:
>
> errorPane.domNode.style.width = "300px";
> errorPane.domNode.style.height = "200px";
>
> Thanks anyway
>
>
> 2007/2/28, Olivier THIERRY <olivier.thierry at gmail.com>:
> Hi,
>
> I need to set the style (width and height) for a modal floating  
> pane which is built from Javascript.
> But I can't find the way to do it ...
> I think the problem is the same for any widget.
>
> I wrote the following code :
>
>         var errorPane = dojo.widget.createWidget(
>             "ModalFloatingPane",
>             {
>                 widgetId: "errorPane",
>                 title: "Error",
>                 resizable: false,
>                 hasShadow: true,
>                 displayCloseAction: false,
>                 style: "width:300px;height:200px"
>             });
>
> Thanks in advance
>
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-interest/attachments/20070228/0fe8ea2b/attachment.html


More information about the Dojo-interest mailing list