Announcement

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

    Hover Action for FormItem Picker Icon

    SmartClient version v9.1p_2016-04-15
    Firefox 45.0.2

    How could we assign a hover behavior to a FormItem's picker icon? ie. to show the picker when the picker icon is hovered. The API specifies a prompt variable (see http://www.smartclient.com/docs/10.0...ckerIconPrompt) but no hover method.

    The API for FormItem does include an itemHover method (see http://www.smartclient.com/docs/10.0...Item.itemHover), and sub-methods for titleHover and valueHover, but no method for iconHover or pickerIconHover.

    #2
    I was wondering if this is supported in v9.1p_2016-04-15?

    Comment


      #3
      Sorry for the delay on this. Here's a quick follow up to let you know where things stand.

      There isn't an existing API to specify a hover action for a formItem icon / pickerIcon.
      We're looking at whether it would make sense to make such an API available and will follow up after some internal discussion.

      Regards
      Isomorphic Software

      Comment


        #4
        On deeper reflection - you should be able to get what you want by using the itemHover event and calling the method 'getEventItemInfo()'.
        The itemHover event actually fires whenever the user hovers over a particular "part" of an item - the text box, an icon, etc. If the user hovers over the picker icon, you should see the eventItemInfo object's "icon" attribute populated with the name of the picker icon ("picker").
        This API is available in 9.1 (and above).

        We're making some changes to make this clearer in the documentation.

        Regards
        Isomorphic Software

        Comment


          #5
          I added the following method to my custom item and everything seems to work.

          Code:
           itemHover: function(item, form) {
                    if (form.getEventItemInfo().icon === "picker") {
                        this.showPicker();
                    }
                }
          Thanks

          Comment

          Working...
          X