Page 1 of 1

How to use ShowPanel to show a panel with a button ?

Posted: Thu Apr 24, 2025 6:44 am
by Nico595
Hello,

I want use ShowPanel Built-in Function in my PcApp project to show or hide the panels from button on the main panel.
I can't found example or information in the Wiki.

I created "Id" in the Properties of the panel and I call Panel.ShowPanel(1,1) Built-in Function in the macro of the button, but it don't work.

EDIT: With this properties, I have the same Id for all Panels. Created properties is for the Panel Component. I can't create a new properties in the Panel Properties (Master Panel) section.

How to create Id properties per Panel Name ?
Annotation 2025-04-24 083248.png
Annotation 2025-04-24 083248.png (37.83 KiB) Viewed 2100 times
Annotation 2025-04-24 083504.png
Annotation 2025-04-24 083504.png (17.92 KiB) Viewed 2100 times

Thank you for your advices.

Re: How to use ShowPanel to show a panel with a button ?

Posted: Thu Apr 24, 2025 8:33 am
by medelec35
Hello.
You need to get the ID of the panel.
The first panel added will be 0, the second panel added will be 1 and so on.
If you are not sure the order, then first make sure your panel has a suitable name.
After saving the app project, look at the fcsx file with a text editor.
The panel id will be shown before its name e.g.
Panel id.png
Panel id.png (1.48 KiB) Viewed 2071 times
You then can use the ShowPanel API just like you did to show the panel using 1 within the Show parameter or hide the panel using using 0 within the Show parameter.

Re: How to use ShowPanel to show a panel with a button ?

Posted: Thu Apr 24, 2025 8:36 am
by Nico595
Hi Martin,

Thank you so much for your fast answer, I try it now:)

EDIT: Great, work fine.

Thank you :)

Re: How to use ShowPanel to show a panel with a button ?

Posted: Thu Apr 24, 2025 9:08 am
by medelec35
That's brilliant!.
Thanks for letting us know.