|
Re: Programmatically layout the ScrolledComposite of the tabbed property framework [message #507639 is a reply to message #507500] |
Thu, 14 January 2010 08:29 |
Christoph Czernohous Messages: 6 Registered: July 2009 |
Junior Member |
|
|
Ok, I found a way to achieve what I want, but I would consider it a
hack:
===========================
Composite parent = composite.getParent();
while (! (parent instanceof ScrolledComposite)) {
parent = parent.getParent();
}
parent.setBounds(0, 0, 0, 0);
parent.getParent().layout(true, true);
===========================
From my composite I navigate up the hierarchy and change the size
of the ScrolledComposite. After that I force its parent to layout
its children.
Isn't there a cleaner way to do this? Apparently I must change
the size of the ScrolledComposite in order to update the scroll
bars.
Christoph Czernohous wrote:
> Hello,
>
> I have a composite on a tabbed property page. The size of widgets on the
> composite changes depending on the actions the user performs on that
> page.
> If the size of a widget exceeds the size of the property page or the
> currently scrollable area on the page, the widget gets truncated.
>
> I tried all kinds of layout(), pack(), update() etc. calls on basically
> every widget in the hierarchy up to the shell, but the scrolled
> composite up in the hierarchy only adjusts the scroll bars when I resize
> the Properties view manually.
>
> How can I make the scroll bars refresh to the correct size after
> resizing widgets on the page.
>
> Thanks
>
> Christoph
|
|
|
Powered by
FUDForum. Page generated in 0.02476 seconds