Problem with ColumnLayout order in Eclipse Forms [message #661644] |
Fri, 25 March 2011 12:50  |
Eclipse User |
|
|
|
Hi,
I'm a newbie at plugin development and i've run into on problem with the ColumnLayout for Eclipse Forms.
The code we're running is the following:
private Composite grupo;
private FormToolkit toolkit;
private ScrolledForm form;
/**
* This is a callback that will allow us to create the viewer and initialize
* it.
*/
@Override
public void createPartControl(final Composite parent) {
toolkit = new FormToolkit(parent.getDisplay());
form = toolkit.createScrolledForm(parent);
form.setText("Hello World");
ColumnLayout layout = new ColumnLayout();
layout.maxNumColumns = 2;
form.getBody().setLayout(layout);
Label label = null;
for (int i = 0; i < 10; i++) {
label = toolkit.createLabel(form.getBody(), "Text label #" + i);
}
}
based on the code from this web:
http://java-gui.info/Wiley-Professional.Java.Interfaces.with .SWT.JFace/12093/BBL0105.html
The problem is that with that code the order of the labels is not what it's supposed to be. It's supposed to be:
Text#0 Text#5
Text#1 Text#6
Text#2 Text#7
Text#3 Text#8
Text#4 Text#9
The same way it appears in <link> but instead of that what i get is:
Text#0 Text#4
Text#1 Text#5
Text#2 Text#6
Text#3 Text#7
Text#8 Text#9
It doesn't have anything to do with the labels cause we've tried with other controls and the same thing happens. I thought it could be
a bug on the library but i've tried with versions 3.4.1 and 3.5.2 of eclipse forms and the problem remains.
Has any body run into this problem?
My team would be thankful if somebody could spot any problem in our code or give us feedback about the execution of the same code.
We haven't found any information about a similar bug reported in the eclipse forms library but if there's such we'd also be thankful if
somebody could confirm the existence of such bug for us.
Thanks in advance.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02956 seconds