Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » ScrolledComposite: Groups
ScrolledComposite: Groups [message #465434] Tue, 13 December 2005 06:34 Go to next message
Eclipse User
Originally posted by: roni.sternberg.attunity.com

Hi,

i've created a JFace Dialog with ScrolledComposite holding list of groups,
i have a 2 problems:

(1) ok/cancel buttons do not show , unless the user resizes the dialog first

(2) the dialog doesn't show the last group, ie: i've set the dialog to fit 5
groups, when adding the 6th group, the horizontal scroll bar appears, but
there's a need
to scroll down again to see the 6th group; i want to be able to see it
right away.

Can anyone help? i've tried using setFocus and all kinds of examples
i found in the web, with no success.

thanks in advance.
Re: ScrolledComposite: Groups [message #465441 is a reply to message #465434] Tue, 13 December 2005 08:38 Go to previous message
Veronika Irvine is currently offline Veronika Irvine
Messages: 1272
Registered: July 2009
Senior Member
1) After adding widgets to the group you need to have the group invoke its
layout again. You can do this by calling layout() on the group or calling
group.getShell.layout(new Control[] {okButton, cancelButton}) . The later
will ensure that all parent widgets are also laid out in the event that some
of the parents also need to change size. Since you are using a
ScrolledComposite, you may need to reset the minimum size values or resize
the content of the Scrolled Composite after adding the new buttons.

2) You can cause the ScrolledComposite to scroll to the new location by
calling ScrolledComposite.setOrigin(). For an example of how this is used
see:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet188.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup


"roni" <roni.sternberg@attunity.com> wrote in message
news:dnmbkm$rqh$1@news.eclipse.org...
> Hi,
>
> i've created a JFace Dialog with ScrolledComposite holding list of groups,
> i have a 2 problems:
>
> (1) ok/cancel buttons do not show , unless the user resizes the dialog
> first
>
> (2) the dialog doesn't show the last group, ie: i've set the dialog to fit
> 5 groups, when adding the 6th group, the horizontal scroll bar appears,
> but there's a need
> to scroll down again to see the 6th group; i want to be able to see it
> right away.
>
> Can anyone help? i've tried using setFocus and all kinds of examples
> i found in the web, with no success.
>
> thanks in advance.
>
Previous Topic:Bug in SWT
Next Topic:getBounds method in Scrollbar class is missing
Goto Forum:
  


Current Time: Wed Aug 27 07:03:56 EDT 2014

Powered by FUDForum. Page generated in 0.02887 seconds