Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Redrawing newly created widget
Redrawing newly created widget [message #446873] Fri, 03 December 2004 23:23 Go to next message
Eclipse UserFriend
Originally posted by: darrellt.gmail.com

I have a progam with a shell not drawing newly created widgets.

I can create a shell that displays my widgets, but when I dispose the
widjets and add new ones to the shell. the new widgets do not show up
until I resize the window.

I have tryed the following things:

shell.redraw();
shell.update();
shell.notifyListeners(SWT.Paint,event);

The only thing that works is shell.pack(), but this only redraws if the
window size changes.

I am sure this is something simple

Please share your swt knowledge with me!!
Re: Redrawing newly created widget [message #446874 is a reply to message #446873] Sat, 04 December 2004 04:06 Go to previous messageGo to next message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="serif">Call Shell#layout(true) or Shell#layout(), they do
the same thing.<br>
<br>
Daniel<br>
</font><br>
Darrell Taylor wrote:
<blockquote cite="midcoqshp$gge$1@www.eclipse.org" type="cite">I have a
progam with a shell not drawing newly created widgets.
<br>
<br>
I can create a shell that displays my widgets, but when I dispose the
widjets and add new ones to the shell. the new widgets do not show up
until I resize the window. <br>
I have tryed the following things: <br>
shell.redraw();
<br>
shell.update();
<br>
shell.notifyListeners(SWT.Paint,event);
<br>
<br>
The only thing that works is shell.pack(), but this only redraws if the
window size changes. <br>
I am sure this is something simple
<br>
<br>
Please share your swt knowledge with me!!
<br>
<br>
</blockquote>
</body>
</html>
Re: Redrawing newly created widget [message #446888 is a reply to message #446874] Sun, 05 December 2004 22:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: darrellt.gmail.com

shell.layout dosent seem to work either.

Daniel Spiewak wrote:

> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <meta content="text/html;charset=ISO-8859-15"
> http-equiv="Content-Type">
> <title></title>
> </head>
> <body bgcolor="#ffffff" text="#000000">
> <font face="serif">Call Shell#layout(true) or Shell#layout(), they do
> the same thing.<br>
> <br>
> Daniel<br>
> </font><br>
> Darrell Taylor wrote:
> <blockquote cite="midcoqshp$gge$1@www.eclipse.org" type="cite">I have a
> progam with a shell not drawing newly created widgets.
> <br>
> <br>
> I can create a shell that displays my widgets, but when I dispose the
> widjets and add new ones to the shell. the new widgets do not show up
> until I resize the window. <br>
> I have tryed the following things: <br>
> shell.redraw();
> <br>
> shell.update();
> <br>
> shell.notifyListeners(SWT.Paint,event);
> <br>
> <br>
> The only thing that works is shell.pack(), but this only redraws if the
> window size changes. <br>
> I am sure this is something simple
> <br>
> <br>
> Please share your swt knowledge with me!!
> <br>
> <br>
> </blockquote>
> </body>
> </html>
Re: Redrawing newly created widget [message #446892 is a reply to message #446888] Mon, 06 December 2004 03:28 Go to previous messageGo to next message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="serif">You know, I really can't say what's wrong unless I
see your code.  Can you post the code for just the class which controls
the shell?<br>
<br>
Daniel<br>
</font><br>
Darrell Taylor wrote:
<blockquote cite="midcp0103$fvu$1@www.eclipse.org" type="cite">shell.layout
dosent seem to work either.
<br>
<br>
Daniel Spiewak wrote:
<br>
<br>
<blockquote type="cite">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML
4.01 Transitional//EN"&gt;
<br>
&lt;html&gt;
<br>
&lt;head&gt;
<br>
  &lt;meta content="text/html;charset=ISO-8859-15"
<br>
 http-equiv="Content-Type"&gt;
<br>
  &lt;title&gt;&lt;/title&gt;
<br>
&lt;/head&gt;
<br>
&lt;body bgcolor="#ffffff" text="#000000"&gt;
<br>
&lt;font face="serif"&gt;Call Shell#layout(true) or Shell#layout(),
they do
<br>
the same thing.&lt;br&gt;
<br>
&lt;br&gt;
<br>
Daniel&lt;br&gt;
<br>
&lt;/font&gt;&lt;br&gt;
<br>
Darrell Taylor wrote:
<br>
&lt;blockquote cite=<a class="moz-txt-link-rfc2396E" href="mailto:midcoqshp$gge$1@www.eclipse.org">"midcoqshp$gge$1@www.eclipse.org"</a> type="cite"&gt;I
have a
<br>
progam with a shell not drawing newly created widgets.
<br>
  &lt;br&gt;
<br>
  &lt;br&gt;
<br>
I can create a shell that displays my widgets, but when I dispose the
<br>
widjets and add new ones to the shell. the new widgets do not show up
<br>
until I resize the window. &lt;br&gt;
<br>
I have tryed the following things: &lt;br&gt;
<br>
shell.redraw();
<br>
  &lt;br&gt;
<br>
shell.update();
<br>
  &lt;br&gt;
<br>
shell.notifyListeners(SWT.Paint,event);
<br>
  &lt;br&gt;
<br>
  &lt;br&gt;
<br>
The only thing that works is shell.pack(), but this only redraws if the
<br>
window size changes. &lt;br&gt;
<br>
I am sure this is something simple
<br>
  &lt;br&gt;
<br>
  &lt;br&gt;
<br>
Please share your swt knowledge with me!!
<br>
  &lt;br&gt;
<br>
  &lt;br&gt;
<br>
&lt;/blockquote&gt;
<br>
&lt;/body&gt;
<br>
&lt;/html&gt;
<br>
</blockquote>
<br>
<br>
<br>
</blockquote>
</body>
</html>
Re: Redrawing newly created widget [message #446938 is a reply to message #446892] Mon, 06 December 2004 18:24 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Call layout on the parent of the controls you have just created. If this
causes "parent" to be too small, call layout on the parent of "parent"
instead.

"Daniel Spiewak" <djspiewak@hotpop.com> wrote in message
news:cp0jln$g4n$1@www.eclipse.org...
You know, I really can't say what's wrong unless I see your code. Can you
post the code for just the class which controls the shell?

Daniel

Darrell Taylor wrote:
shell.layout dosent seem to work either.

Daniel Spiewak wrote:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="serif">Call Shell#layout(true) or Shell#layout(), they do
the same thing.<br>
<br>
Daniel<br>
</font><br>
Darrell Taylor wrote:
<blockquote cite="midcoqshp$gge$1@www.eclipse.org" type="cite">I have a
progam with a shell not drawing newly created widgets.
<br>
<br>
I can create a shell that displays my widgets, but when I dispose the
widjets and add new ones to the shell. the new widgets do not show up
until I resize the window. <br>
I have tryed the following things: <br>
shell.redraw();
<br>
shell.update();
<br>
shell.notifyListeners(SWT.Paint,event);
<br>
<br>
The only thing that works is shell.pack(), but this only redraws if the
window size changes. <br>
I am sure this is something simple
<br>
<br>
Please share your swt knowledge with me!!
<br>
<br>
</blockquote>
</body>
</html>
Previous Topic:No Display.getCurrent() when opening Swing Component
Next Topic:3.1 Stream Integration Build Wed, 1 Dec 2004
Goto Forum:
  


Current Time: Mon Oct 26 14:15:45 GMT 2020

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

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

Back to the top