FieldEditorPreferencePage [message #1368527] |
Tue, 20 May 2014 02:53  |
Eclipse User |
|
|
|
I'm using a FieldEditorPreferencePage for my Preference Window. I'm also using FieldEditor Abstract base class for all my field editors in the Preference window.
I have 3 radio buttons and as the user clicks on the radio button a text will be displayed at the bottom of the window educating the user on the selected options, My problem is that, the text of the label is very long and does not fit into the Preference window. I want the label text to wrap up automatically as the size of the window grows or shrinks, I tried every possible thing to wrap up the text but instead the text gets lost, for example I have tried :
GridData g = new GridData(GridData.FILL_BOTH);
g.widthHint = 200;
Label l = new Label(getFieldEditorParent(), SWT.BEGINNING | SWT.WRAP);
l.setLayoutData(g);
l.setText("Long Msg");
getFieldEditorParent() returns a parent composite for a field editor.
Apart from the above code, I have also tried all the other possible combinations of parameters for GridData and the Label, but the result in the UI part remains the same(text will get lost if the size of the text exceeds the size of the window). I can set the size of the window to fit the text, but that is hard-coding.
How can I possibly wrap up the label text as the window's size grows and shrinks? Is this an issue with FieldEditorPreferencePage? Is there a conflict using a label in a preference page? Someone please explain in brief as to why this happens?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03639 seconds