1. #1
    Ext GWT Premium Member
    Join Date
    Jan 2009
    Location
    Colorado Springs, CO
    Posts
    363
    Vote Rating
    5
    DavidHoffer is on a distinguished road

      0  

    Question 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?

  2. #2
    Ext GWT Premium Member takayser's Avatar
    Join Date
    Oct 2008
    Location
    Lucerne, Switzerland
    Posts
    188
    Vote Rating
    0
    takayser is an unknown quantity at this point

      0  

    Default


    read javadoc of FormLayout:
    Code:
     * To add a component that is not a Field subclass, see {@link AdapterField}.
    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.

  3. #3
    Ext GWT Premium Member
    Join Date
    Jan 2009
    Location
    Colorado Springs, CO
    Posts
    363
    Vote Rating
    5
    DavidHoffer is on a distinguished road

      0  

    Question


    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?

Thread Participants: 1