Click here to Skip to main content
15,902,447 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

I have a windows form containing a panel(Panel1) and user Control(uc1). This user control itself is a container for some other control (eg:GridEx). I want load this user control vertically into panel1 repetitively.

I wrote following code:

VB
x=0,y=0
uc1.size = new system.drawing.size(400,200)

for i as integer = 0 to n
   me.panel1.controls.Add(uc1)
   uc1.loacation = new system.drawing.point(x,y)
   y=y+200
next


The problem with this coding is some time the GridEx may be large size in this situation the controls are overlapping.. how can i solve this?

hope u can
Posted
Updated 19-Aug-10 8:48am
v2

1 solution

What about using the standard Dock [^] and Anchor[^] settings?
 
Share this answer
 
v2

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