Announcement

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

    Override showPicker method doesn't work

    Isomorphic,

    I'm trying to override the showPicker method for TextItem and it doesn't work. It just shows the default square box. Is this a bug.

    Code:
    TextItem origin = new TextItem() {
                @Override
                public void showPicker() {
                    SC.say("Hi");
                }
            };
    Thanks.

    #2
    Is also tried the other approach of using the Picker Icon as given in the showcase:

    Code:
     PickerIcon arrowIcon = new PickerIcon(PickerIcon.COMBO_BOX, new FormItemClickHandler() {
                public void onFormItemClick(FormItemIconClickEvent event) {
                    SC.say("arrow Picker clicked");
                }
            });
            setIcons(arrowIcon);
            setIconHeight(10);
    setIconHeight doesn't change the height of the image. Please find the attached image.

    Thanks.
    Attached Files
    Last edited by harsha.galla; 19 Jan 2012, 03:41. Reason: Attach image

    Comment


      #3
      Hi,

      The 2nd approach worked by calling setHeight() on PickerIcon object instead of setIconHeight on the TextItem. I still couldn't get around with the first approach.

      Thanks.

      Comment


        #4
        Glad to hear you have a working usage for your application.
        On the first issue - the 'showPicker()' override not firing in response to pickerIcon click - we see the issue and will be resolving it in the near future. However you can continue with the approach of using 'setIcons(...)' directly.

        On the sizing issue, things are behaving as intended.
        The PickerIcon you created here has a default height set. This takes precedence over the item level iconHeight attribute. Therefore you have to modify the default directly on the icon.
        If you had used a basic FormItemIcon with no specified height, the item level iconHeight attribute would have been applied to it
        Code:
                FormItemIcon arrowIcon = new FormItemIcon();
                arrowIcon.addFormItemClickHandler(new FormItemClickHandler() {
                    public void onFormItemClick(FormItemIconClickEvent event) {
                        SC.say("arrow Picker clicked");
                    }
                });
                item11.setIconHeight(10);
                item11.setIcons(arrowIcon);
        Regards
        Isomorphic Software

        Comment


          #5
          Thanks, for your confirmation.

          Comment


            #6
            We've added FormItem.addPickerIconClickHandler() to 3.1d - see builds after 10/5.

            Comment

            Working...
            X