Hi All,
I think I am barking up the wrong tree here but I need to dynamically change the functionality of a button depending on another programmatic state.
Since the UI elements are static and cant change at runtime, I thought maybe I could have two overpaying buttons , one a toggle and one a momentary and switch the visibility of them programmaticly.
So far I have had no success, has anyone achieved this (or an alternative) before please?"
Thanks,
Murf.
Dynamically change from toggle to momentary?
-
- Posts: 117
- Joined: 11 Aug 2021
Hello! I'm not an expert but cannot you send a value with programming state that dynamically changes the algorithm that is used to handle the value of the button? For example, button is always momentary but you have another something that lights up depending of an algorithm results.
By the way, Hamu's Newtrol have ability to change buttons from momentary to toggle so maybe it is possible yet.
By the way, Hamu's Newtrol have ability to change buttons from momentary to toggle so maybe it is possible yet.
-
- RE Developer
- Posts: 542
- Joined: 21 Jun 2019
- Location: Brisbane, Australia
Yes that could work but not really the UI experience I was going for._andreypetr_ wrote: ↑28 Apr 2023Hello! I'm not an expert but cannot you send a value with programming state that dynamically changes the algorithm that is used to handle the value of the button? For example, button is always momentary but you have another something that lights up depending of an algorithm results.
By the way, Hamu's Newtrol have ability to change buttons from momentary to toggle so maybe it is possible yet.
I will check out Newtrol first thanks!
-
- RE Developer
- Posts: 459
- Joined: 21 Apr 2016
- Location: Las Vegas
I don't see why this approach would not work:Murf wrote: ↑28 Apr 2023Since the UI elements are static and cant change at runtime, I thought maybe I could have two overpaying buttons , one a toggle and one a momentary and switch the visibility of them programmaticly.
So far I have had no success, has anyone achieved this (or an alternative) before please?"
* it is perfectly valid to have 2 overlapping widgets as long as they are not visible at the same time
* it is perfectly valid to have the same property represented by 2 (or more) widgets, even if they are different (like a momentary button and a toggle button)
* it is perfectly valid for the visibility property to be a RT property, and changed by RT
So when you say "So far I have had no success", what do you mean exactly? Did you set everything up properly?
I'll try to build a little POC, but I really don't see why it would not work...
Yan
-
- RE Developer
- Posts: 459
- Joined: 21 Apr 2016
- Location: Las Vegas
@buddard LOL I just tried...
So I guess I was wrong and indeed that is not possible.
That being said, I am pretty sure you can implement your own button behavior by using a custom display since a custom display CAN have a RT property in its list of dependent properties...
I have implemented something that needed similar concepts in my A/B 12 switch (check the source)
So I guess I was wrong and indeed that is not possible.
That being said, I am pretty sure you can implement your own button behavior by using a custom display since a custom display CAN have a RT property in its list of dependent properties...
I have implemented something that needed similar concepts in my A/B 12 switch (check the source)
You do not have the required permissions to view the files attached to this post.
-
- RE Developer
- Posts: 542
- Joined: 21 Jun 2019
- Location: Brisbane, Australia
Thanks Yan, yes thats the error I got, it is the same one you get if you try and change a UI element state programatically.pongasoft wrote: ↑29 Apr 2023@buddard LOL I just tried...
So I guess I was wrong and indeed that is not possible.
That being said, I am pretty sure you can implement your own button behavior by using a custom display since a custom display CAN have a RT property in its list of dependent properties...
I have implemented something that needed similar concepts in my A/B 12 switch (check the source)
I have changed approach and getting the job done a different way now, but thanks for taking the time everyone.
-
- Information
-
Who is online
Users browsing this forum: CommonCrawl [Bot] and 0 guests