Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » Custom composite with GridLayout
Custom composite with GridLayout [message #997298] Sat, 05 January 2013 06:28
kuldeep Singh is currently offline kuldeep SinghFriend
Messages: 2
Registered: January 2013
Junior Member
Hi,
I m using xwt.
I have extented composite to have default properties like GridLayout already set.

public class GridComposite extends Composite {
   private GridLayout layout;

   public GridComposite(Composite parent, int style) {
      super(parent, style);
      layout = new GridLayout(2, false);
      setLayout(layout);
  

   }
   public void setNumColumns(int numColumns) {
	   layout.numColumns = numColumns;
      layout();
   }
}



It is working fine in swt.
But in xwt grid layout properties like horizontal and vertical span are not working in window builder and all components mess up.

XWT looks like this-
<JDGrid x:Style="BORDER" bounds="111, 97, 138, 93" x:Name="grid" numColumns="2">
		<Label text="New Label" x:Name="label">
			<Label.layoutData>
				<GridData horizontalSpan="2"/>
			</Label.layoutData>
		</Label>
		<Label/>
		<Label text="New Label" x:Name="label_1"/>
	</JDGrid>


if i change my xwt to this everything works fine-
<JDGrid x:Style="BORDER" bounds="111, 97, 138, 93" x:Name="grid" numColumns="2">
		<JDGrid.layout>
			<GridLayout numColumns="2"/>
		</JDGrid.layout>
		<Label text="New Label" x:Name="label">
			<Label.layoutData>
				<GridData horizontalSpan="2"/>
			</Label.layoutData>
		</Label>
		<Label/>
		<Label text="New Label" x:Name="label_1"/>
	</JDGrid>



Thankx.
Previous Topic:KeyEvent inside Eclipse/WindowBuilder doesn't work
Next Topic:Incomplete product installation
Goto Forum:
  


Current Time: Fri Apr 19 08:56:08 GMT 2024

Powered by FUDForum. Page generated in 0.02715 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top