eclipse - Layout problems in FieldEditorPreferencePage -


I have problems with layout settings in the Field Editor page.
My code is something like this:

  Public Zero-Building Fields Editors () {Group PV = New Group (getfieldEditorParent (), SWT.SHADOW_OUT); = Group of new groups (getfieldEditorParent (), SWT.SHADOW_OUT); Pv.setText ("PV"); Of.setText ("of"); Grid layout layout = new grid layout (2, wrong); Pv.setLayout (layout); Of.setLayout (layout); AddField ("StringFieldEditor" ("PreferStore Name", "Text:", PV); AddField (New Stringfield Editor ("Preference Store Name", "Text:", PV); AddField (New Stringfield Editor ("Preference Store Name" , "Text:";); AddField (New Stringfield Editor ("Priority Name", "Text:", of) and so on.}  

The problem is with this gridlove Stringfield editors are not parallel, the number of columns is always 1. Whenever I'm in groups If you try to change the shape of Ringfield Editors, then it also does not work.

Does anybody have any ideas?
thanks

The problem is that when you are using FieldEditorPreferencePage , you only use FieldEditor as components Here's a snippet from a document:

FieldEditorPreferencePage uses a page that uses these field editors on the pref page Instead of creating SWT control to fill the content instead, instead of creating SWT control, a FieldEditorPrintPagePage sub-section makes it possible for content editors to display content. All fields on the page should be implemented as field editors < / Strong>.

This means that you have two options for what you want to achieve:

  1. Field Editor own Apply subclass, which will represent the group widget.
  2. Do not extend the field editor prevalence page , but only one preferences instead of this you createFieldEditors instead of CreateContents method to apply. You also have to manage the loading and savings of properties.

I think if you want to provide some complex layouts then the other way can be easier. You can get some information


Comments