HISE Logo Forum
    • Categories
    • Register
    • Login

    Tooltip question

    Scheduled Pinned Locked Moved General Questions
    3 Posts 3 Posters 329 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      TNTHM
      last edited by

      I have a 2 state button and I want to have a different tooltip based on the state. I am using the method

      Label1.setTooltip();

      in a function that looks like this

      inline function onLabel1Control(component, value)
      {
      
      	if (value == 1) {
      		Label1.setTooltip("1");
      	} else {
      		Label1.setTooltip("2");
      	}
      };
      
      Content.getComponent("Label1").setControlCallback(onLabel1Control);
      
      

      The tooltip change only registers if I press compile after toggling the state of the button. How do I get it to register without having to do that?

      Dan KorneffD d.healeyD 2 Replies Last reply Reply Quote 0
      • Dan KorneffD
        Dan Korneff @TNTHM
        last edited by Dan Korneff

        @TNTHM
        Do you have a snip to share? That makes tinkering easier.

        Maybe the changed() function?

        	if (value == 1) {
        		Label1.setTooltip("1");
        	} else {
        		Label1.setTooltip("2");
        	}
             Label1.changed();
        

        Dan Korneff - Producer / Mixer / Audio Nerd

        1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey @TNTHM
          last edited by

          @TNTHM Why are you changing it in the label callback and not the button callback?

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          24

          Online

          1.7k

          Users

          11.8k

          Topics

          102.7k

          Posts