Nautis
Nautis

Reputation: 157

Eclipse Plugin Development Questions

I´ve got some questions which shouldn´t be hard for a plugin developer.

layout.numColumns = 3;

But how do I change the row for a added control? (Button first row, text second row, list third row)

I think when I´m using GridLayout i also have to define the size of the listbox?

-Last thing is there a simple checkbox in the widget library from SWT?

Upvotes: 1

Views: 273

Answers (3)

gwinnem
gwinnem

Reputation: 76

I would recommend you to use a property file instead. Check out the java.util.Properties for more details. You have everything there to help you out.

Drop me a line if you have problems and i will write a quick blog post for this at my blog.

Geirr

Upvotes: 0

Nikolay Kasyanov
Nikolay Kasyanov

Reputation: 947

About listbox size, try following:

GridData gd = new GridData();
gd.heightHint = 100;
gd.widthHint = 100;
listbox.setLayoutData(gd);

listbox should be in GridLayout, of course.

Upvotes: 1

Gilbert Le Blanc
Gilbert Le Blanc

Reputation: 51565

My Plugin should read an INI File and then put the strings into a list. So how do I read a INI File in PDE is there any class? A example code would be amazing.

Take a look at the IFile interface.

Further on I´m using Grid Layout, but I don´t know how I can control the columns.

You use SWT.PUSH to put the widgets onto the Grid Layout. If layout.numColumns = 3;, that's 3 pushes for each row.

If you want a more complicated layout than a simple grid, you have to use Composites to group the widgets.

Last thing is there a simple checkbox in the widget library from SWT?

Yes, it's a Button with a SWT.CHECK style.

Upvotes: 0

Related Questions