How to layout OK & Cancel button like in Preference dialog [message #465967] |
Tue, 27 December 2005 07:15  |
Eclipse User |
|
|
|
Hi all,
I need to layout OK and Cancel buttons just like in Preference dialog
where the buttons are aligned right with a separator above them. I manage
to align the buttons but I fail to make separator span the entire area.
Here's my code:
//The following methods is overidden from MessageDialog class
protected void createButtonsForButtonBar(Composite parent)
{
Label separator = new Label(parent,SWT.SEPARATOR | SWT.HORIZONTAL);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
data.horizontalSpan = 2;
separator.setLayoutData(data);
super.createButtonsForButtonBar(parent);
}
Any help would be greatly appreciated.
Thanks in advanced.
Setya
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04946 seconds