Redrawing newly created widget [message #446873] |
Fri, 03 December 2004 18:23  |
Eclipse User |
|
|
|
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 #446938 is a reply to message #446892] |
Mon, 06 December 2004 13:24  |
Eclipse User |
|
|
|
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>
|
|
|
Powered by
FUDForum. Page generated in 0.03737 seconds