Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Problem with ColumnLayout order
Problem with ColumnLayout order [message #659022] Thu, 10 March 2011 17:28 Go to next message
imediava  is currently offline imediava Friend
Messages: 9
Registered: February 2011
Junior Member
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.
Re: Problem with ColumnLayout order [message #661417 is a reply to message #659022] Thu, 24 March 2011 15:22 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
You may get more repsonse if you ask in the eclipse.platform.ua newsgroup,
as that is where eclipse's forms implementation lives.

Grant


"imediava" <imediava@yahoo.es> wrote in message
news:ilb1bj$4pj$1@news.eclipse.org...
> 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.
Previous Topic:Re: SSWT - how to change tooltip font for a toolbar object
Next Topic:Canvas with overlaid buttons speed problem
Goto Forum:
  


Current Time: Fri Apr 19 05:50:58 GMT 2024

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

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

Back to the top