Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Different hover for different items in radiogroupitem

    BuildDate Wed Mar 05 15:52:00 IST 2014
    Version 4.1p
    SCVersionNumber v9.1p_2014-03-05


    Team,
    I am using following component :-
    final RadioGroupItem radioBtn = new RadioGroupItem();
    I set values in this using setValueMap(LinkedHashMap<>)

    I am trying to show different hover message for different radio buttons in this radiogroupitem. I have tried:-
    radioBtn.addItemHoverHandler(new ItemHoverHandler() {
    @Override
    public void onItemHover(ItemHoverEvent event) {
    FormItem radioItem = event.getItem();
    if (radioItem.getDisplayValue().equalsIgnoreCase("All fields")) {
    radioItem.setPrompt("Msg 1");
    }

    else if (radioItem.getDisplayValue().equalsIgnoreCase("Parent level")) {
    radioItem.setPrompt("Msg 2");
    } else {
    radioItem.setPrompt("Msg 3");
    }
    }
    });

    But my problem is it shows same message (the selected radio button ) for hover on any of the radio buttons.

    Also if i try to set its width , it shows different widths at different points of hover.

    I have attached screenshots for reference.
    Can you help?
    Attached Files

    #2
    Try using 'setItemProperties' to specify your custom hover behavior for each generated radio-item within the group, rather than specifying a hover handler for the radioGroupItem as a whole.

    Regards
    Isomorphic Software

    Comment


      #3
      Team,

      Can you please elaborate on how to get each generated radio-item within the group?

      Comment


        #4
        You do not get the generated items - you use setItemProperties as previously explained.

        Comment

        Working...
        X