Ext


Go Back   Ext JS Forums > Ext GWT Community Forums (2.x) > Gxt: Help

Reply
 
Thread Tools
  #1  
Old 11-03-2009, 12:30 PM
iyeh iyeh is offline
Ext GWT Premium Member
 
Join Date: Oct 2009
Posts: 47
iyeh is on a distinguished road
Default Add space to toolbar

How do I add space before the first item on ToolBar? I tried setSpacing, but that only sets the spacing between the first item and the following items. I need about 30px spacing between the edge of the toolbar and the first item.
Reply With Quote
  #2  
Old 11-03-2009, 03:52 PM
terciofilho terciofilho is offline
Ext GWT Premium Member
 
Join Date: Jul 2009
Posts: 17
terciofilho is on a distinguished road
Default

What about:

		final BoxComponent spaceItem = new BoxComponent()
		{
			@Override
			protected void onRender(final Element target, final int index)
			{
				this.setElement(DOM.createDiv(), target, index);
			}
		};
		spaceItem.setWidth(50);
		toolbar.add(spaceItem);
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 04:00 PM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.