Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Label not Visible
Label not Visible [message #77097] Thu, 06 March 2008 08:56 Go to next message
Eclipse UserFriend
Originally posted by: me.micha-shl.de

Hey all,

I don`t know if it`s a bug or a 'feature'?!
I created my own Entrypoint, but in the first Version:

final Display display = new Display();
final Shell shell = new Shell(display);
shell.setSize(560, 420);
shell.setText("Shell Title");

shell.setLayout( new FillLayout());

final Label label = new Label(shell, SWT.CENTER);
label.setText("============= Start =================");
label.setVisible(true);
label.setEnabled(true);

shell.open();
...
the Label is not visible.
If I move the shell.setSize(560, 420) between the label.setEnabled(true)
and shell.open() the Label shows just fine.

Hope I don`t out me as an Newbie.

Regards
Michael
Re: Label not Visible [message #77111 is a reply to message #77097] Thu, 06 March 2008 10:30 Go to previous message
Eclipse UserFriend
Hi Michael,

Either you call shell.setSize() just before shell.open() or use
shell.pack() to trigger layouting. Otherwise the shell isn't layouted
and thats why your label isn't visible.

Regards,
Stefan.

Michael schrieb:
> Hey all,
>
> I don`t know if it`s a bug or a 'feature'?!
> I created my own Entrypoint, but in the first Version:
>
> final Display display = new Display();
> final Shell shell = new Shell(display);
> shell.setSize(560, 420);
> shell.setText("Shell Title");
>
> shell.setLayout( new FillLayout());
>
> final Label label = new Label(shell, SWT.CENTER);
> label.setText("============= Start =================");
> label.setVisible(true);
> label.setEnabled(true);
> shell.open(); ...
> the Label is not visible.
> If I move the shell.setSize(560, 420) between the label.setEnabled(true)
> and shell.open() the Label shows just fine.
>
> Hope I don`t out me as an Newbie.
>
> Regards Michael
Previous Topic:CoolBarManager issue
Next Topic:UIThread Problem
Goto Forum:
  


Current Time: Sun May 11 22:00:30 EDT 2025

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

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

Back to the top