Home AMX User Forum AMX Design Tools

TPDesign4 Layers

I'm new to TPDesign4, so bear with me here.

I have a touchpanel design that exists basically in illustrator/photoshop and I'm trying to actually get inserted into TPDesign. I've got most of it figured out, but there's one little issue I'm still working on.

My main menu always occupies part of the screen, but sometimes if there's a need for a submenu, it occupies more. The part that occupies more is partially transparent. How can I only make the main menu show up once and still have it be on top of everything else?

The basic problem I"m running in to is if I pop up the DVD Controls using a popup page, that popup page is automatically the top layer on the panel, so if I hit a submenu, the submenu comes out BENEATH the popup page instead of on top of it. Is there a way to make the popup page not be the top thing?

The first thing I've thought of is making my main menu a popup as well, instead of on the main page itself. However, I dont know how to always make it the top popup. I had thought I might set it up so that if I hit "DVD" that first I would pop up the DVD Controls, and then I would pop up the Main Menu again, even though its already open, and that would make the main menu the top layer again. Still, even if it works, this seems like a workaround. Is there some feature I should be aware of that I'm not?

This is difficult to explain in text, please let me know if I need to clarify

J

Comments

  • Spire_JeffSpire_Jeff Posts: 1,917
    If it is like I am picturing, you could handle it a couple of ways.
    First,
    You could make the main menu a popup and put it in a group with submenu popups. Each submenu popup would then require all of the graphics and buttons from the main menu as well as the submenu buttons. Opening a submenu popup would automatically close the main menu popup because they are in the same group. This method would allow you to use a different background image in each popup page, giving greater flexibility in the way the submenu graphics interact with the main menu graphics.

    Second,
    The submenus could be sized to be only the actual size of the sub menu. This would restrict you from altering the graphics of the main menu, but you should not have problems with the submenu blocking the main menu. This would also require precise placement of the popup so that it lines up appropriately with the main menu. Also, you would have to play around with the show and hide positions if you want the popup to slide out of the main menu.

    Third,
    I am sure there is probably another way and hopefully someone can share it. My guess is that it would involve Chameleon imaging or one of the new features in the G4 panel firmware.

    Hope this helps,
    Jeff
  • JeffJeff Posts: 374
    I've finally found the answer, just in case anyone else wants to try something similar. Basically what it came down to was complete control of all popups from the program, not in the panel, and an enormous include file that handles all of the page flips separate from the control code.

    If you have two popups on the screen, the one most recently popped up is the top layer. If you send @PPN to the bottom layer one, it moves to the top. In my program, this happens invisibly, because its all transparent layers and the user can't tell whats happening.

    So basically I just go back and forth and do a lot of popup on and off in the program. Its cumbersome, but effective and reliable, so whatever.

    From your explanation I dont think I effectively communicated the issue. I'm really pleased with how it turned out, so I may try to do some screencaps soon so you can see exactly what I'm talking about.

    J
  • ipssheldonipssheldon Posts: 106
    I do what you are trying to do all of the time. For instance, in a residential application, I have some rooms that require volume control with level feedback while other rooms have IR volume (such as to control a TV) or fixed volume (control from a knob on the wall). I have a routine that manages just the volume pop-up that I call after all other pop-ups and menus are displayed. The same might be for custom TV controls that apply to one room but not the others that get added to the full set of Sat TV controls, or whatever. All you do is manage your standard popups first, and then call one or more routines that handle whatever you want on top. It doesn't have to be complicated code. Just handle each piece individually and make certain that they fall in the correct order.

    Sheldon Samuels
    IPS Resources LLC
  • JeffJeff Posts: 374
    Thats basically what I did. I created an include file (because I've got at least 10 rooms that'll be getting a panel off this basic template) that does all the presses, with 4 different button arrays for the buttons and 2 submenu calls (on and off), and at the moment I've done all of the page flips in 154 lines of code.

    I was just hoping to figure out how to do it in the touchpanel file itself, so that it would be easier for nonprogrammers to implement this template later on. Doing it this way requires a bit of knowledge of exactly whats happening to create additional rooms, but if you know what you're doing it isn't hard.

    I g uess what I really wanted all along was for popup pages to have the ability to be set as "Active Touch", but you can't win 'em all, I guess

    J
  • Above Popups Property

    Jeff,

    Another potential way to do this is set the "Above Popups" property of the button or buttons that comprise the Main Menu on the main page. If this property is set to "yes" then that button (or buttons) will always appear above the pop-up pages. I have done this when I have wanted pop-ups to appear as coming from behind the button (or buttons)selected.

    PDK
Sign In or Register to comment.