Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » 3 Problems with wrapping ToolBars which contain Components in special separator items
3 Problems with wrapping ToolBars which contain Components in special separator items [message #445760] Wed, 10 November 2004 15:55 Go to next message
Stefan Zeiger is currently offline Stefan ZeigerFriend
Messages: 102
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080009070604010504080006
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hello,

This is a modified version of Snippet58 (added SWT.WRAP to ToolBar, put
separator at the end, added GridLayout to do the wrapping):

import org.eclipse.swt.*;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;

public class Snippet {

public static void main (String [] args) {
Display display = new Display ();
Shell shell = new Shell (display);
shell.setLayout(new GridLayout());
ToolBar bar = new ToolBar (shell, SWT.BORDER|SWT.WRAP);
bar.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, true));
for (int i=0; i<4; i++) {
ToolItem item = new ToolItem (bar, 0);
item.setText ("Item " + i);
}
int start = bar.getItemCount ();
for (int i=start; i<start+4; i++) {
ToolItem item = new ToolItem (bar, 0);
item.setText ("Item " + i);
}
ToolItem sep = new ToolItem (bar, SWT.SEPARATOR);
Combo combo = new Combo (bar, SWT.READ_ONLY);
for (int i=0; i<4; i++) {
combo.add ("Item " + i);
}
combo.pack ();
sep.setWidth (combo.getSize ().x);
sep.setControl (combo);
bar.pack ();
shell.pack ();
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
}

When I make the window tall enough to see wrapped controls and then make
it smaller pixel by pixel, I see the following problems:

1. The separator with the Combo does not wrap correctly. It does not
wrap when it doesn't fit on the first line anymore but only when it
becomes completely invisible on the first line.

2. The wrapped Combo stays glued to the left edge of last line when it
gets removed from the first line. Other wrapped ToolItems are placed
behind it (see win1.jpg). (Strangely enough I cannot reproduce this
problems with my NAF demo apps but I'm not sure what I'm doing
differently in NAF)

3. When I increase the window's width by one pixel after one of the
regular ToolItems has just wrapped, that ToolItem disappears from the
second line but is not shown on the first line (see win2.jpg). Covering
and uncovering the window does not help, neither does maximizing and
restoring. When I increase the width some more, the right edge of the
ToolItem is shown (see win3.jpg). At this point covering and uncovering
the window will make the ToolItem render correctly again.

All this happens with SWT 3.1 M3 (I've confirmed #1 with 3.0.1 but
haven't tested for the other 2 problems) on Win XP Pro SP1 with Windows
Classic theme. Are these SWT bugs or is there something wrong with the
Snippet?

--
Stefan Zeiger http://www.szeiger.de http://www.novocode.com
My SWT controls: http://www.novocode.com/swt

--------------080009070604010504080006
Content-Type: image/jpeg;
name="win1.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="win1.jpg"

/9j/4AAQSkZJRgABAQEASABIAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYW GDEjJR0oOjM9
PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgV GC8aGi9jQjhC
Y2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2Nj Y2NjY2P/wAAR
CACgAPQDASIAAhEBAxEB/8QAGgABAAIDAQAAAAAAAAAAAAAAAAIEAwUGAf/E AEYQAAEDAgEG
CQkHAgYCAwAAAAEAAgMEEQUSEyFTktEUFTFBVHKTobEGIjI1UVVhkdJSYnGB orLBFkIjJDM0
c3RDlGSz8P/EABgBAQEBAQEAAAAAAAAAAAAAAAABAgME/8QAJREBAAICAgIC AgIDAAAAAAAA
AAECERMDURIUQWEEISKhYoHh/9oADAMBAAIRAxEAPwDoMVxPi4xARMeHt57C 2gfD4rX/ANTf
/GZ8x9K2coDsdw4EAjJfoPUC3OZi1bNkLtE8dax5Vz/tztF5n+M/05T+o3C1 6RovyXt9K9/q
N3RWfMfSrHlexjI6TJY1t3O5BbmC5sL08fFx3r5Yc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9
6C8io8cYd0uPvTjjDulx96C8io8cYd0uPvTjjDulx96C8io8cYd0uPvTjjDu lx96C8io8cYd
0uPvTjjDulx96C8io8cYd0uPvTjjDulx96C8io8cYd0uPvTjjDulx96C8io8 cYd0uPvTjjDu
lx96C8io8cYd0uPvTjjDulx96Dm/Kb1u/qN8EWPH54qnEnSQvD2Fo0hFpH// 2Q==
--------------080009070604010504080006
Content-Type: image/jpeg;
name="win2.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="win2.jpg"

/9j/4AAQSkZJRgABAQEASABIAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYW GDEjJR0oOjM9
PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgV GC8aGi9jQjhC
Y2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2Nj Y2NjY2P/wAAR
CACgAOQDASIAAhEBAxEB/8QAGgABAAIDAQAAAAAAAAAAAAAAAAIEAwUGAf/E AEYQAAEDAgEG
CQkHAgYCAwAAAAEAAgMEEQUSEyExU9EUFUFUcpKTobEGIjI1UVVhkdJSYnGB orLBFkIjJDM0
c3RDlGSz8P/EABgBAQEBAQEAAAAAAAAAAAAAAAABAgME/8QAJREBAAICAgIC AgIDAAAAAAAA
AAECERMDURIUQWEEISKhYoHh/9oADAMBAAIRAxEAPwDoMVxPi4xARMeHt5bC 2gfD4rX/ANTf
/GZ8x9K2coDsdw4EAjJfoPQC3OZi2bOqF2ieOtY8q5/252i8z/Gf6cp/Ubha 9I0X1Xt9K9/q
N3NWfMfSrHlexjI6TJY1t3O1C3IFzYXp4+LjvXyw5ze9ZxMt6PKF3NWfMbl6 PKB3Nmd25aMK
YWvX4+k2W7bsY87mzO7cvePXc3Z3blpQpBTRx9Gy3bcjHHc3Z3bl6MadsGd2 5agKQU0cfRst
223HLtgzu3L0Yw7YM7ty1QUwpop0bLdtnxs7Ys+Q3KXGrtiz5D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k2j+sVBEE87JtH9YpnZNo/rFQRBPOybR/WKZ2TaP6xUEQTzsm 0f1imdk2j+sV
BEE87JtH9YqLnOcbuJJ+JXiION8pvW7+g3wRPKb1u/oN8EWkdrL6Y6LfAKCn L6Y6LfAKCyoi
IgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIg43ym9bv6DfBE8pvW7+ g3wRaR2svpjo
t8AoKcvpjot8AoLKiIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiD jfKb1u/oN8ET
ym9bv6DfBFpHay+mOi3wCgpy+mOi3wCgsqIiICIiAiIgIiICIiAiIgIiICIi AiIgIiICIiAi
IgIiION8pvW7+g3wRPKb1u/oN8EWkdrL6Y6LfAKCqS4zh2XbhcZsANB9gUOO MO53H3rKryKj
xxh3O4+9OOMO53H3oLyKjxxh3O4+9OOMO53H3oLyKjxxh3O4+9OOMO53H3oL yKjxxh3O4+9O
OMO53H3oLyKjxxh3O4+9OOMO53H3oLyKjxxh3O4+9OOMO53H3oLyKjxxh3O4 +9OOMO53H3oL
yKjxxh3O4+9OOMO53H3oLyKjxxh3O4+9OOMO53H3oLyKjxxh3O4+9OOMO53H 3oLyKjxxh3O4
+9OOMO53H3oLyKjxxh3O4+9OOMO53H3oLyKjxxh3O4+9OOMO53H3oOb8pvW7 +g3wRY8fniqc
SdJC8PYWjSEWkf/Z
--------------080009070604010504080006
Content-Type: image/jpeg;
name="win3.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="win3.jpg"

/9j/4AAQSkZJRgABAQEASABIAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYW GDEjJR0oOjM9
PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgV GC8aGi9jQjhC
Y2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2Nj Y2NjY2P/wAAR
CACgAO4DASIAAhEBAxEB/8QAGgABAAIDAQAA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Z8F0C5/yu9Xp+mfBIHRy+mOi3wCgqkuM4dl24 XGbADQfcFDjj
DuVx96C8io8cYdyuPvTjjDuVx96C8io8cYdyuPvTjjDuVx96C8io8cYdyuPv TjjDuVx96C8i
o8cYdyuPvTjjDuVx96C8io8cYdyuPvTjjDuVx96C8io8cYdyuPvTjjDuVx96 C8io8cYdyuPv
TjjDuVx96C8io8cYdyuPvTjjDuVx96C8io8cYdyuPvTjjDuVx96C8io8cYdy uPvTjjDuVx96
C8io8cYdyuPvTjjDuVx96C8io8cYdyuPvTjjDuVx96C8io8cYdyuPvTjjDuV x96C8uf8rvV6
fpnwWy44w7lcfetN5S1tNVwQinmbIWuNwPZoSB//2Q==
--------------080009070604010504080006--
Re: 3 Problems with wrapping ToolBars which contain Components in special separator items [message #445991 is a reply to message #445760] Mon, 15 November 2004 18:18 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Please enter a bug report, one for each.

"Stefan Zeiger" <szeiger@novocode.com> wrote in message
news:cmtdpf$tvg$1@eclipse.org...
> Hello,
>
> This is a modified version of Snippet58 (added SWT.WRAP to ToolBar, put
> separator at the end, added GridLayout to do the wrapping):
>
> import org.eclipse.swt.*;
> import org.eclipse.swt.layout.GridData;
> import org.eclipse.swt.layout.GridLayout;
> import org.eclipse.swt.widgets.*;
>
> public class Snippet {
>
> public static void main (String [] args) {
> Display display = new Display ();
> Shell shell = new Shell (display);
> shell.setLayout(new GridLayout());
> ToolBar bar = new ToolBar (shell, SWT.BORDER|SWT.WRAP);
> bar.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, true));
> for (int i=0; i<4; i++) {
> ToolItem item = new ToolItem (bar, 0);
> item.setText ("Item " + i);
> }
> int start = bar.getItemCount ();
> for (int i=start; i<start+4; i++) {
> ToolItem item = new ToolItem (bar, 0);
> item.setText ("Item " + i);
> }
> ToolItem sep = new ToolItem (bar, SWT.SEPARATOR);
> Combo combo = new Combo (bar, SWT.READ_ONLY);
> for (int i=0; i<4; i++) {
> combo.add ("Item " + i);
> }
> combo.pack ();
> sep.setWidth (combo.getSize ().x);
> sep.setControl (combo);
> bar.pack ();
> shell.pack ();
> shell.open ();
> while (!shell.isDisposed ()) {
> if (!display.readAndDispatch ()) display.sleep ();
> }
> display.dispose ();
> }
> }
>
> When I make the window tall enough to see wrapped controls and then make
> it smaller pixel by pixel, I see the following problems:
>
> 1. The separator with the Combo does not wrap correctly. It does not
> wrap when it doesn't fit on the first line anymore but only when it
> becomes completely invisible on the first line.
>
> 2. The wrapped Combo stays glued to the left edge of last line when it
> gets removed from the first line. Other wrapped ToolItems are placed
> behind it (see win1.jpg). (Strangely enough I cannot reproduce this
> problems with my NAF demo apps but I'm not sure what I'm doing
> differently in NAF)
>
> 3. When I increase the window's width by one pixel after one of the
> regular ToolItems has just wrapped, that ToolItem disappears from the
> second line but is not shown on the first line (see win2.jpg). Covering
> and uncovering the window does not help, neither does maximizing and
> restoring. When I increase the width some more, the right edge of the
> ToolItem is shown (see win3.jpg). At this point covering and uncovering
> the window will make the ToolItem render correctly again.
>
> All this happens with SWT 3.1 M3 (I've confirmed #1 with 3.0.1 but
> haven't tested for the other 2 problems) on Win XP Pro SP1 with Windows
> Classic theme. Are these SWT bugs or is there something wrong with the
> Snippet?
>
> --
> Stefan Zeiger http://www.szeiger.de http://www.novocode.com
> My SWT controls: http://www.novocode.com/swt
>


------------------------------------------------------------ ----------------
----






------------------------------------------------------------ ----------------
----






------------------------------------------------------------ ----------------
----
Previous Topic:Java2D equiv. for SWT?
Next Topic:Look of the views
Goto Forum:
  


Current Time: Tue Oct 27 16:30:15 GMT 2020

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

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

Back to the top