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

Discuss PC Developer and Web Developer projects and features here.
Post Reply
User avatar
Nico595
Posts: 95
http://meble-kuchenne.info.pl
Joined: Tue Jul 04, 2023 4:17 pm
Has thanked: 18 times
Been thanked: 4 times

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

Post 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 2089 times
Annotation 2025-04-24 083504.png
Annotation 2025-04-24 083504.png (17.92 KiB) Viewed 2089 times

Thank you for your advices.

medelec35
Matrix Staff
Posts: 1954
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

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

Post 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 2060 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.
Martin

User avatar
Nico595
Posts: 95
Joined: Tue Jul 04, 2023 4:17 pm
Has thanked: 18 times
Been thanked: 4 times

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

Post by Nico595 »

Hi Martin,

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

EDIT: Great, work fine.

Thank you :)

medelec35
Matrix Staff
Posts: 1954
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

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

Post by medelec35 »

That's brilliant!.
Thanks for letting us know.
Martin

Post Reply