swt - Set Controls with arbitrary positions on CTabItem -
I'm new to SWT, and I need to control control conditions on CTABItem.
I have used the following code, but it seems that it has no positioning effect, it just adds component (0, 0)
  label User name = new label (folder, SWT.NONE); UserName.setText ("user name"); UserName.setBounds (10, 200, 200, 50); Item.setControl (username);     
  You have to set the layout manager on the  folder , example: 
   folder. Saleout (new gridlate ());  
  If you want to give a certain dimension to the control, consider giving it the layout data, eg: 
   GridData gd = new GridData () ; Gd.height = 50; UserName.setLayoutData (GD);  
  I'm not sure that  items  is in your example, but this is not necessary. 
   
 
  
Comments
Post a Comment