Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
On Form there are pairs of panels. In each panel pair have same Tag property. How to move both panels when one of them is moving at time on Form? if have any idea please share.
Posted

1 solution

You can use the events Move and Resize.
If one panel moves you can move the other panel too.

You can choose to let one panel be the master and only implement the events for that panel.

You can also implement the events for both panels and let both control the other.
In this case you need to beware of recursive behavior.
The first Move event that is executed needs to temporarily disable the other panels move event. Otherwise you might have some cool effects in your GUI.
 
Share this answer
 
Comments
George Jonsson 30-Jun-14 5:15am    
Whoever down-voted my solution should present a better one.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900