How to create toggle button?
winstonma
Posts: 45
I think it's a simple problem but I have no idea how to figure that out.
There is a toggle button which I dun know how to turn it on when I pushed the button. Thanks for the help.
There is a toggle button which I dun know how to turn it on when I pushed the button. Thanks for the help.
0
Comments
Or are you trying to control a device with a toggle control such as VCR power?
If you can be more specific, I'm sure it can be solved quite simply!
Jeff
that's a long way to do something very simple
- Chip
So just what exactly is the difference between a wired touchpanel and some other wired device?
I tried but the the button have no effect at all. Do I need set some kinds of properties for the pushbutton?
Make sure the feedback attribute on your touch panel button is set to CHANNEL.
For those that do feedback in timelines and find their button just doesn't toggle states quickly enough for them, there's no reason you couldn't do this:
That gets you the immediate state change, and also allows for any potential changes from elsewhere in the code to be reflected by the traditional feedback statement.
All I know is that I've seen it cause "wonkiness" in the past - in my own code and others - and the wonkiness ceased as soon as variables or a non-tp device's channels were used.
- Chip
I wonder if it was older TPs or something that were screwy (wonky?) like that, and they've fixed it now.
J
Keep in mind - I have 10 years of (self?) brainwashing in place, so I'm sticking with the Old Skool method.
- Chip
As for timeline feedback, I have come to the conclusion that for channel feedback on a real device (not virtuals), you can drop it right in mainline (DEFINE_PROGRAM) with no ill effects. The feedback only goes to the panel when the channel changes. SEND_COMMANDs for text feedback, on the other hand, will go out in a steady stream if you do that, so it's a bad idea and probably a bad habit. What I do, is create a CALL or a function for panel updates. Then I'll just run that in my timeline, or dump it right in DEFINE_PROGRAM if its very simple and I'm being lazy. The other advantage is you can use the GoTo Sub function in studio to easily find your feedback routines (they really, really ought to make a similar tool to find specific events).