ScrolledComposite: Groups [message #465434] |
Tue, 13 December 2005 11:34 |
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 13:38 |
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.
>
|
|
|
Powered by
FUDForum. Page generated in 0.04154 seconds