Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Am writing a code to tile rectangles in a rectangular space.
Now I know .NET does a good job of tiling MDI child forms.
the MdiLayout.TileVertical is more suited for my purpose

Does anyone have an idea of what Algorithm is used to tile MDIChild Forms.


In short I want a function that sets the location and height,width for n rectangular controls(say panels) in the given bounds of a control just the way mdilayout engine does for the mdi children

Thank you
Posted
Updated 22-Sep-13 16:14pm
v2
Comments
Sergey Alexandrovich Kryukov 22-Sep-13 20:29pm    
Who needs MDI, ever? Just forget about this lame... Even Microsoft is trying to get rid of it.
—SA
wizshrutz 22-Sep-13 22:01pm    
Buddy I am not using mdi, but am interested in the algorithm that is used in the mdilayout engine mdilayout.vertical to be specific
BillWoodruff 23-Sep-13 3:28am    
What are you having trouble with in understanding, or using in code, the concept of dividing a rectangular area into #n zones, where the width of each zone is equal to the area's width / number of zones, and the height of each zone is the same as the area's height ?
wizshrutz 23-Sep-13 3:54am    
HiI have no issues implementing mdi in Windows c# application
The algorithm that goes in tiling
As u said the algorithm to divide a rectangular region into n parts is what I am interested in

I would like to replicate the behavior of mdilayout.vertical as close to the original as possible
BillWoodruff 23-Sep-13 5:52am    
I'm trying to see what your question really is, and having some difficulty. You could say the "algorithm" is exactly what I described to you in my first response.

Are you trying to implement, in C#, in Windows Forms, vertically tiled Panels ? If so, what have you tried ? Are you aware of the fact that you can use the Dock property of Controls in WinForms to create any type of tiling you wish ?

Please make your question as specific as possible. Show some of your code here, and describe what's not working for you.

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