how to toggle button from TPDesign?
adys
Posts: 395
Hi all
I know some of you don't like the idea of programming popups from TPDesing, but sometimes its very easy to work with.
I have a button that turn on a popup and move to state on, pushing it again will take it to off and close the popup.
the porblem is I need to handle it for every thouch panel and it can be in different state in every TP, its lot of work that I can save, if only I can do toggle to button state in TPDesign.
I know how to send command from tpdesign, just have no idea how to do toggle....
I have many buttons like that (Our GUI design what to do) and It will be very very helpfulll to toggle it from TPDesign if possible.
Thanks
Ady.
I know some of you don't like the idea of programming popups from TPDesing, but sometimes its very easy to work with.
I have a button that turn on a popup and move to state on, pushing it again will take it to off and close the popup.
the porblem is I need to handle it for every thouch panel and it can be in different state in every TP, its lot of work that I can save, if only I can do toggle to button state in TPDesign.
I know how to send command from tpdesign, just have no idea how to do toggle....
I have many buttons like that (Our GUI design what to do) and It will be very very helpfulll to toggle it from TPDesign if possible.
Thanks
Ady.
0
Comments
You've just given a good example of why it's best to do the touch panel navigation and feedback state control from the program. If you did all this within the program your problem would go away.
Eric is correct. We don't DISLIKE doing nav in the tpd; we just know it will bite us later. I think this is a "Get over it" situation - no offence 8^)
there a sitsuations that are better go with TPDesign, and this time its the best example for it.
There is not need to write code if you don't must too, things are working very good this way.
Why do I need to monitor 5 button X 18 screens X 10 TPs?
Its a stupid button that only open a popup
the question is if toggle can be done via TPDesign and how.
On the contrary,
I would never try to manage that many buttons,screen,popups on the touch panel. It's much easier in code. I have installs with over 30 touch panels of different sizes and on each touch panel are over 100 popus.
In fact every one of my touch panels have the exact same TP file in them. However, they all look and act completely differently. The file management of that many touch panels (TP4 files) would drive me crazy. I'd rather do it once and be done with it.
As for rewriting or writing code unecesarily, I haven't rewritten my Page/Popup Navigation code in over 2 years. I keep using the same hunk of code. I just change the data tables that drive them. That is infinitely easier than redoing a touch panel file. The data table consists of the names of the popups. Each entry is something like 10-15 chars long.
If you're able to do it the way you want within TP design, then we have no argument. Do it however works best for you.
Advice is only advice. You can choose to take it or ignore it.
thanks for the advice.
The dynamic part of the house works in code, the non dynamic part I do in TPDesign.
If I can't do toggle in TPDesign I will do it in code, but I wish I could avoid simple operations from code.
Nornally I would do this in code, but since you asked...
Your button that activates the pop up would need to actually activate two pop ups; the pop up itself and a duplicate button (pop up) directly on top of the original button. Pressing the overlayed button would then remove the two pop ups simulating a toggle pop up function.
Thanks, I thought of it, but that is more work than in code... I dont want to dupe the screens so I will have to do it in code, I guess...
I think I just threw up in my mouth, a little...
Hopefully, you had a tasty breakfast.
Of course you can always use the toggle popup page flip action.
Showing my age I guess...no such function in earlier versions of TPD when we first started with touch panels in 1988.