Home AMX User Forum AMX Technical Discussion

how to know size and position of a button

Hi!

Is there a way to "ask" a button for its size and position?
I have several popups with the same 4 buttons in them (same address code). They change their size and position depending on the popup in wich they are. So i need to ask the TP for the size and position of the 4 buttons each time the popup changes.

Any idea?

Thanks!

Comments

  • HedbergHedberg Posts: 671
    MorgoZ wrote: »
    Hi!

    Is there a way to "ask" a button for its size and position?
    I have several popups with the same 4 buttons in them (same address code). They change their size and position depending on the popup in wich they are. So i need to ask the TP for the size and position of the 4 buttons each time the popup changes.

    Any idea?

    Thanks!

    Isn't it possible to have multiple instances of the same button each with different values for size and position, even on the same page?

    If so, I'm not sure how the TP could respond, so I doubt that it's possible.

    You can, however, dictate the size and position of a button (which, I would assume, would affect all buttons with the same address).
  • John NagyJohn Nagy Posts: 1,742
    As mentioned, the address you would have to ask would be common to all the (different) instances. So even if you could ask, there is no way the answer would come from the one you had in mind...

    Why would this information be of use to you anyway?
    If it is in order to know which popup is displayed, do page tracking, or better yet, don't flip within the panel, request a flip and have the master command it. Then you know what is displayed.
  • HedbergHedberg Posts: 671
    John Nagy wrote: »
    As mentioned, the address you would have to ask would be common to all the (different) instances. So even if you could ask, there is no way the answer would come from the one you had in mind...

    Why would this information be of use to you anyway?
    If it is in order to know which popup is displayed, do page tracking, or better yet, don't flip within the panel, request a flip and have the master command it. Then you know what is displayed.

    And, if you want buttons to appear with a certain size and position depending on the popup, track the popup and manipulate the buttons.
  • viningvining Posts: 4,368
    Hedberg wrote: »
    And, if you want buttons to appear with a certain size and position depending on the popup, track the popup and manipulate the buttons.
    Yeah but if you have different pop ups then you just create the pop up in TPD4 the way you want unless the different idividual pop ups need to dynamically change themselves. To me it sound like they don't so I'm not understanding what the OP is really trying to accomplish. My 1st impresion was page tracking by determining which button scheme was showing.
  • MorgoZMorgoZ Posts: 116
    Thanks to all!

    The reason why i need to get the size of the buttons dinamically is because we are using the TPI-PRO to compose up to 4 video inputs in one picture output (sorry for my english, can´t explain it better). So, each pop-up represents a "Preset" composed by 4 buttons that represent the 4 video inputs.
    Then, the output of the TPI (with its 4 images) is manipulated by a third party device, wich needs to know the size of each window (button).

    What i though to do is to make a HUGE array of positions and sizes for each button at each popup-up, but this idea is awfull and ugly... and that´s the reason why i would like to be able to ask dinamically to each button for its size and position, so i wouldn´t need to program a big-ugly-hard-coded list.

    What i don´t understand is: Ok, i can´t ask a button for its size because there could be many instances of the same button.... But there are some "Button query commands" to ask a button for its image, icon, text, etc.... But the problem is the same: there could be many buttons with the same instance but with different texts, icons, bitmaps, etc. It isn´t?

    Thanks again!
  • John NagyJohn Nagy Posts: 1,742
    You really need to rethink your design. It's not going to work, and to have to ask the panel the result of what it has done is to ignore the concept of "control".

    Yes, the button queries are unreliable in the condition where the same address has multiple instances. Don't use them.
Sign In or Register to comment.