Announcement

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

    Set dynamic icon tooltip

    Hi,

    How can I set a dynamic tooltip to dynamic icon which is initialized as the following:
    (this.setPrompt - sets the prompt to the button and not to the icon itself. The button in this case don't have a tooltip anyway).

    headerButtonProperties: {

    icon: "someIconA",

    iconClick: function() {
    if (x) {
    this.setIcon("someIconA");
    // this.setPrompt("Collapse");
    } else {
    this.setIcon("someIconB");
    // this.setPrompt("Expand");
    }
    }

    }

    TNX!
    Last edited by kilani; 9 Dec 2019, 00:21.

    #2
    You don't to do this via changing the prompt dynamically - instead see listGrid.headerHoverHTML()

    Comment


      #3
      I need a tooltip for the icon, not for the whole button.

      Comment


        #4
        OK, prompt can still be changed via setProperties() - in the documentation, note the "IRW" flags. Click through for details.

        Comment


          #5
          isc.IButton.create({
          title: "Hello",
          prompt: 'this is a button prompt',
          icon: "icons/16/world.png",
          iconOrientation: "left",
          click: "isc.say('Hello world!')"
          })

          This prompt is for the button.
          There is an option to set a prompt (tolltip) for the icon? so, hovering the icon img will show different tooltip?
          How can I set and which property should I use for icon tooltip?

          thank u.

          Comment


            #6
            There is no way to set a separate hover for the icon - the icon for a button is not a separate component. You could compose together a Label and an Img component if you wanted to have an icon that had full, separate interactivity.

            Comment


              #7
              What is the right approach to do it? how? tnx

              Comment


                #8
                Hi Isomorphic,

                any ideas? tnx

                Comment


                  #9
                  We have already answered. See above:

                  You could compose together a Label and an Img component if you wanted to have an icon that had full, separate interactivity.

                  Comment

                  Working...
                  X