Hi,
currently, I am experimenting with the layout of some wizard pages I've
created for an application I am currently working on.
As to find some kind of "best practise", I've come across the following:
I've got a wizard page containing an explanatory text (Label) that
occupies several lines. In the past, I've solved this by inserting
"hard" line breaks (\n) into the string. However, this is not a very
elegant approach, as of course this label won't adapt its size when the
wizard dialog is resized.
A better solution would be to use a Label that has the SWT.WRAP style
set, and to set a GridData that grabs the available space and fills its
cell as to make the Label automatically adapt its size to the dialog.
This works fine on Linux-Gtk; however, on win32 it does not - the label
stretches the entire dialog.
So, I've got two questions concerning this:
1. What is the difference in the described behaviour based on?
Obviously, gtk takes another "reference" for laying out the dialog and
determining its width than win32 does.
2. What would be a proper solution to this? Setting a width hint? If so,
where? Wizard dialog, wizard page, label?
(Actually, the same applies to PreferencePages; see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=107064)
Best wishes,
Karsten