Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » No scrollbars with ScrolledForm
No scrollbars with ScrolledForm [message #441434] Mon, 16 August 2004 08:14 Go to next message
Eclipse UserFriend
Originally posted by: markus.jakob.triadem.ch

Hi

I'm using Eclipse Forms.
My problem is that on the ScrolledForm no scrollbars appear when the
window size is reduced.
What am i doing wrong?

I'm working with:
OS: Windows XP
JRE: j2re1.4.2_05
Eclipse: Version: 3.0.0 Build id: 200406251208


public static void main(String[] args)
{
Display display = new Display();
SignalEditor application = new SignalEditor();
Shell topShell = application.open(display);

topShell.pack();
topShell.open();

while (!topShell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep ();
}
}
display.dispose ();
}

private Shell open(Display display)
{
applicShell = new Shell(display, SWT.SHELL_TRIM);
toolkit = new FormToolkit(display);
form = toolkit.createScrolledForm(applicShell);
GridLayout layout = new GridLayout();
form.getBody().setLayout(layout);

.
.
.

form.pack();
toolkit.paintBordersFor(form.getBody());

return(applicShell);
}
Re: No scrollbars with ScrolledForm [message #441529 is a reply to message #441434] Mon, 16 August 2004 20:44 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Can't help you with ScrolledForm (and there is not enough code in your
example to debug this) but here is a snippet showing how to use
ScrolledComposite:

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/snippits/snippet5.html

"Markus Jakob" <markus.jakob@triadem.ch> wrote in message
news:cfpqg0$qpd$1@eclipse.org...
> Hi
>
> I'm using Eclipse Forms.
> My problem is that on the ScrolledForm no scrollbars appear when the
> window size is reduced.
> What am i doing wrong?
>
> I'm working with:
> OS: Windows XP
> JRE: j2re1.4.2_05
> Eclipse: Version: 3.0.0 Build id: 200406251208
>
>
> public static void main(String[] args)
> {
> Display display = new Display();
> SignalEditor application = new SignalEditor();
> Shell topShell = application.open(display);
>
> topShell.pack();
> topShell.open();
>
> while (!topShell.isDisposed()) {
> if (!display.readAndDispatch()) {
> display.sleep ();
> }
> }
> display.dispose ();
> }
>
> private Shell open(Display display)
> {
> applicShell = new Shell(display, SWT.SHELL_TRIM);
> toolkit = new FormToolkit(display);
> form = toolkit.createScrolledForm(applicShell);
> GridLayout layout = new GridLayout();
> form.getBody().setLayout(layout);
>
> .
> .
> .
>
> form.pack();
> toolkit.paintBordersFor(form.getBody());
>
> return(applicShell);
> }
Previous Topic:How to cause right click to both show popup menu and select item clicked on?
Next Topic:Unsolvable problem: TreeViewer and hove?
Goto Forum:
  


Current Time: Fri Apr 26 19:53:34 GMT 2024

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

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

Back to the top