views:

254

answers:

2

I want to pop up a messagebox in SWT with a potentially long list of items. Can I add a List widget, or should I make a new shell and populate it with a Label, List, and two Buttons?

A: 

Usually the MessageBox is reserved for simple messages, yes/no, OK/Cancel, things like that.

If you want to pop up a potentially long list, I would suggest creating your own dialog. That way you can customize it to look like you want it to look (including Scrollable lists)

Here are some SWT List examples

OTisler
A: 

The eclipse ui package provides some useful dialogs for occasions like these. Check out org.eclipse.ui.dialogs.ListDialog.

thehiatus