Page 1 of 1

Make custom button and set toggle

PostPosted: Fri Apr 07, 2023 7:50 pm
by DKMaker
Hi i want to have a Custom button for a relay and i use a button with button number 20011 that works fine - but i want the green thing to light on as a toggle button - how do i emulate that?

Same as on Spindle CW / mist etc.. Can i somehow set the state for a "macro" button or what is the correct workarround to emulate this behavior.

And how do i select an item if lets say the item is under another object? I placed a label on a LED but i could not select it afterwards - so i had to move one of them to select it again, is there a hotkey to cycle between elements?

Re: Make custom button and set toggle

PostPosted: Fri Apr 07, 2023 9:14 pm
by dezsoe
Set toggletype to true and use double images. The left half is for the off, the right is for the on state. In your macro use AS3.Switchbutton(true/false, buttonnomber); to turn the button on/off.

toggle1.png
toggle1.png (12.2 KiB) Viewed 2764 times

jsp_up.png
jsp_up.png (6.53 KiB) Viewed 2764 times

At the moment you can only select the topmost control.

Re: Make custom button and set toggle

PostPosted: Sat Apr 08, 2023 1:24 am
by ger21
And how do i select an item if lets say the item is under another object?

The way we used to do this with Mach3 is to place the LED first, then place a transparent button over the LED.
But you don't need to do this in UCCNC, because you have Toggle Buttons, as explained above.