B4A Class PanelChange

I tend to use panels and load layouts onto them to manage which panel is active(visible). This can be a bit fiddly to manage so I wrote this tiny class to do the task of making a chosen panel visible. This is particularly helpful if you have many panels. You can have as many panels as you want and the names are not important. It is tiny just 1 method. I have a small demo which has been commented so should be easy to use. Hope it is of some use to others....
panelChange.zip is the original no animation
panelChangeS.zip is the original with basic animation
pcc.zip is curtain animation effect
pcs.zip is shutter effect
 

Attachments

  • panelChange.zip
    333.2 KB · Views: 183
  • panelChangeS.zip
    335.9 KB · Views: 191
  • pcc.zip
    345.1 KB · Views: 169
  • pcs.zip
    352 KB · Views: 145
Last edited:

derez

Expert
Licensed User
Longtime User
Very nice idea, thank you.
Wouldn't it be better to call the panel by its name ? (then you need a list, not map).
 

tremara1

Active Member
Licensed User
Longtime User
Thanks for the idea I have modified the class it is even simpler now....the file in the original post has been updated.
 

tremara1

Active Member
Licensed User
Longtime User
I have played around and added a very simple animation to the panel change. The file panelChangeS.zip contains new example and bas. The original file has the basic version. Just a learning experience. Not too serious.
 

tremara1

Active Member
Licensed User
Longtime User
I have played around with the b4a 4 beta and used the simple animation and it works a treat....this does need the b4a beta version 4.00.
 
Last edited:

tremara1

Active Member
Licensed User
Longtime User
I have updated the animation part it is now a curtain effect and added it to the panelChange....ignore the colors they are just for show you can set them in code as needed a small example is included. You do need the B4a Beta 4.0. in the first post see pcc.zip
 
Last edited:

tremara1

Active Member
Licensed User
Longtime User
I have done another effect using the simple animation in B4A 4.0 beta. It is a shutter effect again ignore the colors you can change them in code. There is a small example included. You do need B4A 4.0 beta. in the first post see pcs.zip
 
Top