Momentary State for LAF Panel Button
-
hey all, i have a button thats painted on to a panel via LAF. trying to enable a momentary state for this button so it only clicks once. is there a way to set this property? this is what im trying but its not correct:
Content.setPropertiesFromJSON("ScriptPanel5", { "width": 27, "height": 29, "allowCallbacks": "Clicks Only", "enableMidiLearn": true, "saveInPreset": true, "isMomentary": true });
-
i have a button thats painted on to a panel via LAF
Panels don't have LAF so I assume you mean a paint routine? In which case, why aren't you using LAF with a button?
-
@d-healey yes sorry it is a paint routine. im just trying to use vector images as the buttons. so does that mean im not able to set these as momentary?
-
@Adam_G A panel is just a panel, it doesn't have button properties. You can make it into a momentary button if you want, but you have to handle it yourself in the mouse callback.
I think what you should be doing though is using a button with LAF.
-
@d-healey im sure youre right. unfortunately, and to my families disappointment, i suck at math lol. alot of the custom LAF functions elude me. can i still use the svg data in the LAF button?
-
@Adam_G Yes, that's exactly what LAF is for
-
@d-healey just what i needed thanks David :)