BEWARE: Hidden/Disabled buttons

Spire_JeffSpire_Jeff Formerly Caffeinated ProgrammerPosts: 1,917
Just a heads up. When creating buttons that overlap, only the top button will be able to be pushed. This applies even when the top button is hidden and disabled. For the example I have, imagine a column the has 3 buttons on it that are 50 pixels wide (modified for easy math) The first button starts at an X coordinate of 0, the second button starts at X25 and the last button starts at X50. The column is 100 pixels wide. Depending on how many buttons I need, I either hide the buttons starting at X0 and X50, or I hide the buttons starting at X25. If I am only displaying the X25 buttons, they will work fine. If I am displaying the other two buttons, you can only touch the X0 buttons from X0 to X25 and the X50 buttons can only be touched from X75 to X100.

This helps explain some of the funky response to touch I have been seeing on our most recent job.

Ahhhh, I think I figured out a way around this, but it requires more programming :(

Jeff

Comments

  • mpullinmpullin Obvious Troll Account, Marked for Deletion Posts: 949
    If only there were a way to loop through all the buttons and set the touch mode of the hidden/disabled ones to "pass-through".
  • Spire_JeffSpire_Jeff Formerly Caffeinated Programmer Posts: 1,917
    That is a great idea (I'm already sending hide and enable commands, so adding touch style would be easy), but I am not finding any commands in PI that indicate the ability to change touch style. The closest thing would be the %ST command, but it is very lightly documented. I have tech support checking with engineering to get clarification on the command, but given the fact that such a command existing will save me a few hours of programming, I doubt that it exists :)

    Jeff
  • a_riot42a_riot42 AMX Wizard Posts: 1,619
    Are you sure about this? I am using this technique on a job right now but haven't tested it. I had thought I had done this before though so I am shocked that you are saying it can't be done.
    Paul
  • DHawthorneDHawthorne Junior Member Posts: 4,584
    I try desperately not to overlap buttons just to avoid stuff like that, but sometimes the design requires it. I don't know that there is an easy answer except maybe to revisit the design if you hit the wall with it. SOme "features" aren't worth the cost of making them work.
  • ericmedleyericmedley Senior Member - 3709 Posts Posts: 4,155
    Spire_Jeff wrote: »
    Just a heads up. When creating buttons that overlap, only the top button will be able to be pushed. This applies even when the top button is hidden and disabled. For the example I have, imagine a column the has 3 buttons on it that are 50 pixels wide (modified for easy math) The first button starts at an X coordinate of 0, the second button starts at X25 and the last button starts at X50. The column is 100 pixels wide. Depending on how many buttons I need, I either hide the buttons starting at X0 and X50, or I hide the buttons starting at X25. If I am only displaying the X25 buttons, they will work fine. If I am displaying the other two buttons, you can only touch the X0 buttons from X0 to X25 and the X50 buttons can only be touched from X75 to X100.

    This helps explain some of the funky response to touch I have been seeing on our most recent job.

    Ahhhh, I think I figured out a way around this, but it requires more programming :(

    Jeff

    I think if you set the button to 'Pass Through' it'll behave better for you.
  • jjamesjjames AMX Sustaining Engineer Posts: 2,898
    ericmedley wrote: »
    I think if you set the button to 'Pass Through' it'll behave better for you.
    That was my first thought when reading this . . . Hmmmm.....
  • yuriyuri Junior Member Posts: 861
    mpullin wrote: »
    If only there were a way to loop through all the buttons and set the touch mode of the hidden/disabled ones to "pass-through".

    using 'find and replace'. Using this, you can search for hidden buttons, and change their state to 'pass-through'. It's a pretty powerfull tool in TP4 :)
Sign In or Register to comment.