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



  • 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



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



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

    Button1.set("enabled", true);

    Works perfectly. Thanks man ✌


Log in to reply
 

8
Online

546
Users

2.0k
Topics

16.0k
Posts