textbutton bangs on press and release
Hi,
I'm trying to make an interface to control some networked devices. I uses a lot of text buttons for styling purposes and I would like to have some of them to send a value when pressed then reset to the default value (1) when released.
I know of ubutton and lcd but I would like to use textbutton to keep the interface consistent. I tried a mouse state object but it obviously send a bang each time I release the mouse even if I don't click the button and I don't want it.
Any idea / help?
Here is my patch...
Textbutton only sends a bang on mouse down OR mouse up, so it won't directly do what you are asking. If you watch the visible action of the textbutton, you'll see that even if you hold your mouse button down over the textbutton, it immediately reverts itself. If you just need it to send a value, and then a short time later send another value, you can do something like this:
If you really need the function of holding the button down, AND want it to look like the other textbuttons, you may need to design something with pictctrl. You could create a graphic button that looks like your other textbuttons and it will behave the way you want. Be sure to look at the help file, and especially the "pictureformats" tab on the help file to properly design your button.
Thanks a lot. I will deal with pictctrl...
I recommend making a feature request for mouse up&down behavior of textbutton. In the meantime, here's a kludgy-but-working solution.
Very clever!
Wow! Really clever!!
Thanks for your solution... I think it works well for what I need at the moment...
How to make a feature request?
I searched the site but I found nothing but posts on the forum for feature requests. Is there a more direct way for doing this?
I think you could just use the bug-report form, and state that you're making a feature request rather than a bug report.
this would be a good feature to have - I've wanted it a few times in the past
I made a feature request using the bug report form as Christopher suggested.
Thanks again for your help.
Wow. Cycling 74 support was really fast to reply but they told me they will unlikely add a such new function to the textbutton because there are many options to achieve the result with minimal patching.
I think I will use the patch that Christopher suggested within a bpatcher to keep everything clean...