Hi Mustafa,

Mustafa Sak wrote:
> Hi,
>  
> could any one tell me how to set width or height to widgets like toolbar?
>  
> .setWidth() just want integer values and sets only pixel; But i need to set 
> 100% of width.
With the following snippet the toolbar get the whole width of the 
application.

--snip--
var container = new qx.ui.container.Composite(new qx.ui.layout.HBox);

var toolbar = new qx.ui.toolbar.ToolBar;

var button = new qx.ui.toolbar.Button("Test");
toolbar.add(button);

// Document is the application root
var doc = this.getRoot();

// Since "doc" has a Canvas layout "100%" is fine
doc.add(composite, { width: "100%" });

// tell the toolbar to use all of the space
composite.add(toolbar, { flex: 1 });
--snip--

The important thing is to control the width of the toolbar through the 
layout and not on the widget itself.

cheers,
   Alex

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to