Click here to Skip to main content
15,921,660 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi frnd...

i have some panels on the form with the anchor propety.. when i resize the form the panels are overlapping on to other.. how to avoid this...
any one help me...

thanks in advance...
Posted

Your anchors aren't set correctly. You're gonna have to muscle through this yourself. It's going to require you to make a change, and then test it out.

EDIT ==============

In response to your comment - if it still doesn't work, you still aren't doing it right. Try this explanation of WinForms anchors:

http://www.techrepublic.com/article/manage-winform-controls-using-the-anchor-and-dock-properties/6165908[^]

If that's not enough, google is your friend (I googled "designer control anchors" to find the link above).
 
Share this answer
 
v2
Comments
Harish Reddy K 16-May-11 7:43am    
sorry... its not working... i checked it in all the ways..
#realJSOP 16-May-11 8:03am    
See my edited answer.
fjdiewornncalwe 16-May-11 14:00pm    
Absolutely. If Anchoring is used properly, there will be no overlapping issues.
Albin Abel 17-May-11 6:52am    
Anchors are good too. The cosmic force by Newton until Einstein suggested the other way. But still agreeable. Whatever forces exists it is unavoidable cosmic collisions sometime. My 5 for anchors can be used effectively if the form designed carefully.
Avoid anchors! There are much better ways to do a stable layout. Prefer Dock.

Please read my recommendation from my past answers:
GUI Apperance - C#.Net[^],
Zom Out malfunctions when Screen resolution changes[^].

—SA
 
Share this answer
 
Comments
fcronin 16-May-11 13:31pm    
Agree with SAKryukov... I didn't view the links, but in general, I like to use split containers and docking to achieve sizable forms that retain layout. If you insist on anchors, it's simply up to you to set them in such a way that your controls size the way you want them to... no trick to it, just have to imagine the behavior based on the top/left/right/bot settings you apply to each control... goodl luck!
Sergey Alexandrovich Kryukov 16-May-11 19:29pm    
Thank you.
The problem with anchor is you need to manually align it or calculate symmetric (for example) size/position in code. More importantly, they tend to flicker.
--SA
Espen Harlinn 16-May-11 15:39pm    
Good reply, my 5
Sergey Alexandrovich Kryukov 16-May-11 19:31pm    
Thank you, Espen.
--SA
Albin Abel 17-May-11 6:52am    
Good alternative to anchors. My 5
Apart from what SAKryukov mentions, you can take a look at the .Net layout panels:
FlowLayoutPanel[^]
TableLayoutPanel[^]

And if you can get yourself a copy of the DevExpress Layout Manager Controls for Windows Forms[^], you will have something really flexible to work with.

Regards
Espen Harlinn
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 16-May-11 19:29pm    
Hi Espen,
They are good to know, too, my 5.
--SA
Espen Harlinn 17-May-11 4:46am    
Thanks SAKryukov!
Albin Abel 17-May-11 6:53am    
Ofcourse layout panel sounds for better layouts. Good solution. My 5
Espen Harlinn 18-May-11 12:47pm    
Thanks Albin :)
Harish Reddy K 23-May-11 2:59am    
Good Solution Frnd...
Thankq very much...

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