Recent

Author Topic: Z-order vs visible  (Read 2242 times)

Zath

  • Sr. Member
  • ****
  • Posts: 391
Z-order vs visible
« on: June 20, 2013, 12:21:04 am »
My program is using multiple panels for different tasks.
Currently each panel is made active with a menu click and making it visible and others not visible.
I'm up to 5 panels and it's looking a little wasteful simply listing each panel and changing its visible property.
If there a more economical way ?
Would using the Z-order be possible ?

User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: Z-order vs visible
« Reply #1 on: June 20, 2013, 01:50:31 am »
1. You could use TPageControl.
2. Each component should have BringToFront method, to change Z-order.
- Problem with this would be, that you can still tab-cycle through the components that are visible behind, enter-click the buttons and type text in hidden edits.
3. You can save into variable the component that was currently active, and hide only that one, when new one is set. Then change the active variable again.
« Last Edit: June 20, 2013, 01:52:42 am by User137 »

 

TinyPortal © 2005-2018