Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Programmatically layout the ScrolledComposite of the tabbed property framework
Programmatically layout the ScrolledComposite of the tabbed property framework [message #507500] Wed, 13 January 2010 12:08 Go to next message
Christoph Czernohous is currently offline Christoph CzernohousFriend
Messages: 6
Registered: July 2009
Junior Member
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
Re: Programmatically layout the ScrolledComposite of the tabbed property framework [message #507639 is a reply to message #507500] Thu, 14 January 2010 08:29 Go to previous message
Christoph Czernohous is currently offline Christoph CzernohousFriend
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
Previous Topic:UML2 Install Failure
Next Topic:SWT painting performance
Goto Forum:
  


Current Time: Thu Apr 25 15:05:09 GMT 2024

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

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

Back to the top