Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » re-layout of composite
re-layout of composite [message #440282] Tue, 27 July 2004 21:41 Go to next message
Eclipse UserFriend
Originally posted by: ryusasai.hotmail.com

Hi,

I want to change the size of a composite
when a button is clicked.
I wrote the code below but the size didn't change.
Please tell me how to fix this.
Thanks,

FormData fmdt = (FormData)composite_4.getLayoutData();
fmdt.right = new FormAttachment(60, 0); // when initialized, right is 90%.
// Want it to be 60% here.
composite_4.setLayoutData(fmdt);
composite_4.setLayout(composite_4.getLayout());
composite_4.layout(); // just wrote just in case
composite_4.redraw(); // just wrote just in case
Re: re-layout of composite [message #440292 is a reply to message #440282] Wed, 28 July 2004 16:41 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Should work. Can you give a complete stand alone example that I can run?
Thanks.

"rsasai" <ryusasai@hotmail.com> wrote in message
news:ce6i65$7f0$1@eclipse.org...
> Hi,
>
> I want to change the size of a composite
> when a button is clicked.
> I wrote the code below but the size didn't change.
> Please tell me how to fix this.
> Thanks,
>
> FormData fmdt = (FormData)composite_4.getLayoutData();
> fmdt.right = new FormAttachment(60, 0); // when initialized, right is
90%.
> // Want it to be 60% here.
> composite_4.setLayoutData(fmdt);
> composite_4.setLayout(composite_4.getLayout());
> composite_4.layout(); // just wrote just in case
> composite_4.redraw(); // just wrote just in case
>
>
>
Previous Topic:How to create progress view?
Next Topic:how to enable Tabs in rcp to look like in Eclipse
Goto Forum:
  


Current Time: Thu Apr 25 11:07:50 GMT 2024

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

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

Back to the top