-
10 Mar 2010 6:29 PM #1
How to add 'help' button to any control in a FormPanel?
How to add 'help' button to any control in a FormPanel?
FormPanel seems a great way to layout the content of a form, however how can you handle the case where you want a help button/link on individual content items?
-
11 Mar 2010 1:19 AM #2
read javadoc of FormLayout:
or simply use another layout, then you can put whatever you want in it, just pay attention to use FormLayout in those panels you put your fields in, because only FormLayout renders the fields label.Code:* To add a component that is not a Field subclass, see {@link AdapterField}.
-
11 Mar 2010 5:57 AM #3
I'm not quite getting how to use AdaperField, I'm new to GXT please bear with me.
I'm trying to add a 'help' icon/link to a RadioGroup, so it's a Field subclass. Ideally I just want to add the help icon/link right at the end of the field label, there is plenty of room there.
So currently my code is like:
LayoutContainer rightLC = new LayoutContainer();
layout = new FormLayout();
layout.setLabelAlign(LabelAlign.TOP);
rightLC.setLayout(layout);
final Radio radio1 = new Radio();
radio1.setBoxLabel("Yes");
final Radio radio2 = new Radio();
radio2.setBoxLabel("No");
RadioGroup group = new RadioGroup();
group.setFieldLabel("Enhanced");
group.add(radio1);
group.add(radio2);
rightLC.add(group, formData);
How can I use AdaperField to add the help icon/link?


Reply With Quote