Resize a composite at runtime? [message #444230] |
Fri, 08 October 2004 23:52 |
Eclipse User |
|
|
|
Originally posted by: manish.garg.gmail.com
Hi,
I am trying to add a composite to my frame dynamically at run time. When
a Button - "Advanced" is cicked. What is the best way to do this?
I am currently trying the following:
The container is a gridlayout. So I try to manipulate the GridData:
button_Advanced.addSelectionListener(new SelectionListener(){
public void widgetSelected(SelectionEvent e) {
GridData gridData_AdvancedOptions = new GridData();
gridData_AdvancedOptions.heightHint = orgHeightHintForAddionalFields;
gridData_AdvancedOptions.widthHint = orgWidthHintForAddionalFields;
gridData_AdvancedOptions.horizontalSpan = 2;
group_AdditionalFields.setLayoutData(gridData_AdvancedOption s);
}
I also tried to manipulate the original GridData object. But this has no
effect. Probably the Group "group_AdditionalFields" is not updated.
Thanks.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03169 seconds