Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to make bottom of composite new "zero" point for GUI(composites, SWT, beginner questions)
How to make bottom of composite new "zero" point for GUI [message #1771629] Mon, 28 August 2017 21:19
Allison McWaters is currently offline Allison McWatersFriend
Messages: 1
Registered: August 2017
Junior Member
I currently have code as such:
public class TemplateWee extends Composite {

/**
* Create the composite.
* @param parent
* @param style
*/
public TemplateWee(Composite parent, int style) {
super(parent, style);
setLayout(new FormLayout());

Composite composite = new Composite(this, SWT.NONE);
composite.setLayout(new GridLayout(10, false));
FormData fd_composite = new FormData();
fd_composite.top = new FormAttachment(0);
fd_composite.left = new FormAttachment(0);
fd_composite.bottom = new FormAttachment(0, 26);
fd_composite.right = new FormAttachment(0, 221);
composite.setLayoutData(fd_composite);

Button button = new Button(composite, SWT.CHECK);

Label lblV = new Label(composite, SWT.NONE);
lblV.setText("v3");

Button button_1 = new Button(composite, SWT.CHECK);

Label lblV_1 = new Label(composite, SWT.NONE);
lblV_1.setText("v4");

Button button_2 = new Button(composite, SWT.CHECK);

Label lblV_2 = new Label(composite, SWT.NONE);
lblV_2.setText("v4.1");

Button button_3 = new Button(composite, SWT.CHECK);

Label lblPnfs = new Label(composite, SWT.NONE);
lblPnfs.setText("pNFS");

Button button_4 = new Button(composite, SWT.CHECK);

Label lblDnfs = new Label(composite, SWT.NONE);
lblDnfs.setText("dNFS");

}

@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}

I'd like for the bottom "line" of the composite to be considered the new "zero" point for the shell. How do I go about doing this? Or is this not possible with SWT?
Previous Topic:How to implement close function for CTabItem
Next Topic:How to add one warning msg before close CTabItem/CTabFolder
Goto Forum:
  


Current Time: Fri Apr 19 06:08:47 GMT 2024

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

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

Back to the top