HISE Logo Forum
    • Categories
    • Register
    • Login

    Changing a components 'Enabled' property via code 🤔 ??

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 316 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.
    • L
      LeeC
      last edited by LeeC

      Hey guys,

      I'm still deep in the world of HISE and I'm loving every second.

      Just stumbled across something that I thought would be easy and obvious but I can't seem to find a way to do it.

      Does anybody know how to get a button to be 'Enabled' or 'Disabled' using code?
      To be clear, I'm referring to the 'enabled' option which is the 2nd option down in the 'Basic Properties' of a selected component.

      It's easy to set a component to be 'Visible' or 'Invisible' using the code below. But I was hoping to use something similar for the 'Enabled' property.
      Eg Button1.isEnabled(value);

      Button1.showControl(!value);
      

      Hope everyones having a good day

      L

      1 Reply Last reply Reply Quote 0
      • Dan KorneffD
        Dan Korneff
        last edited by

        try
        Button1.set("enabled", true);
        or
        Button1.set("enabled", false);

        Dan Korneff - Producer / Mixer / Audio Nerd

        L 1 Reply Last reply Reply Quote 1
        • L
          LeeC @Dan Korneff
          last edited by

          @dustbro said in Changing a components 'Enabled' property via code 🤔 ??:

          Button1.set("enabled", true);

          Works perfectly. Thanks man ✌

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

          41

          Online

          1.7k

          Users

          11.7k

          Topics

          101.9k

          Posts