Home AMX User Forum NetLinx Studio
Options

how to toggle button from TPDesign?

adysadys 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.

Comments

  • Options
    ericmedleyericmedley Posts: 4,177
    adys wrote:
    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.

    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.
  • Options
    NMarkRobertsNMarkRoberts Posts: 455
    ericmedley wrote:
    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^)
  • Options
    adysadys Posts: 395
    Well guys I think you wrong this time

    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.
  • Options
    ericmedleyericmedley Posts: 4,177
    adys wrote:
    Well guys I think you wrong this time

    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.
  • Options
    adysadys Posts: 395
    If I could, I wouldn't ask... :)

    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.
  • Options
    Here is how to do it.
    adys wrote:
    If I could, I wouldn't ask... :)

    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.
  • Options
    adysadys Posts: 395
    B_Clements wrote:
    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...
  • Options
    mpullinmpullin Posts: 949
    B_Clements wrote:
    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.

    I think I just threw up in my mouth, a little... ;)
  • Options
    mpullin wrote:
    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. :o

    Showing my age I guess...no such function in earlier versions of TPD when we first started with touch panels in 1988. ;)
  • Options
    alexanboalexanbo Posts: 282
    Yeah some of the stuff we had to come up with to try and fake feedback on the old one way viewpoints was pretty hacky.
Sign In or Register to comment.