471,319 Members | 1,625 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

How: Layout Managers in .Net [Windows Forms] like Java?

Hi,
How to achieve effect of LayoutManagers like java has Grid, Flow, Border etc
layouts in .Net?
The case is: I am creating the form runtime and adding controls on run-time
so at that time its very hactic to manipulate about other control's sizes,
positions etc so there must be easy way to do such things like what Java
LayoutManagers allow without worring the actual positions in pixels. It
allows me to add, insert etc operation without knowing other control's pixel
positions. I should be allowed to insert some control after some other
control by giving index or name directly which is not possible in Forms. Any
pointers please??

Microsoft is far ahead than Java in UI area then why these basic
functionalities are not there in APIs?

Help please,


Dec 13 '05 #1
5 3768
"Mahesh Devjibhai Dhola [MVP]" <dh*********@hotmail.com> schrieb:
How to achieve effect of LayoutManagers like java has Grid, Flow, Border
etc
layouts in .Net?
The case is: I am creating the form runtime and adding controls on
run-time
so at that time its very hactic to manipulate about other control's sizes,
positions etc so there must be easy way to do such things like what Java
LayoutManagers allow without worring the actual positions in pixels. It
allows me to add, insert etc operation without knowing other control's
pixel
positions. I should be allowed to insert some control after some other
control by giving index or name directly which is not possible in Forms.


If you are using .NET 2.0:

Check out the FlowLayoutPanel and TableLayoutPanel controls, which are
avialable on the "Containers" tab of VS 2005's toolbox.

..NET 1.0/1.1:

Simple Layout Managers
<URL:http://www.dotnet.jku.at/projects/slm/>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Dec 13 '05 #2
Hi,
I know that VS2k5 has such APIs but i m sorry that i forgot to mention about
the .net version that in our production environment we are using vs2k3 so it
cant help.
Also, i have MSDN link for custom layout in windows forms in .net 1.1 but i
was interested to know that is there any built in mechanizm beyond Anchor,
and Dock that we can use directly so that we can avoid Positioning etc??

Thanks for the help,

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...
"Mahesh Devjibhai Dhola [MVP]" <dh*********@hotmail.com> schrieb:
How to achieve effect of LayoutManagers like java has Grid, Flow, Border
etc
layouts in .Net?
The case is: I am creating the form runtime and adding controls on
run-time
so at that time its very hactic to manipulate about other control's sizes, positions etc so there must be easy way to do such things like what Java
LayoutManagers allow without worring the actual positions in pixels. It
allows me to add, insert etc operation without knowing other control's
pixel
positions. I should be allowed to insert some control after some other
control by giving index or name directly which is not possible in Forms.


If you are using .NET 2.0:

Check out the FlowLayoutPanel and TableLayoutPanel controls, which are
avialable on the "Containers" tab of VS 2005's toolbox.

.NET 1.0/1.1:

Simple Layout Managers
<URL:http://www.dotnet.jku.at/projects/slm/>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Dec 14 '05 #3
I have not came across any build in functionality in the .NET framework
1.1 that compares to layout managers like in java. Essentially,
controls are placed on the for by either using absolute positioning or
just by adding the control to the forms' controls collection. Anchoring
and Docking seems to be the only way to alter the layout and behavior
of form controls.

However, maybe there is some component that you can purchase that can
give you the affect that you want.

Dec 14 '05 #4
GotDotNet has some good articles by Chris Anderson on creating layout
managers.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Mahesh Devjibhai Dhola [MVP]" <dh*********@hotmail.com> wrote in message
news:OE**************@TK2MSFTNGP15.phx.gbl...
Hi,
How to achieve effect of LayoutManagers like java has Grid, Flow, Border
etc
layouts in .Net?
The case is: I am creating the form runtime and adding controls on
run-time
so at that time its very hactic to manipulate about other control's sizes,
positions etc so there must be easy way to do such things like what Java
LayoutManagers allow without worring the actual positions in pixels. It
allows me to add, insert etc operation without knowing other control's
pixel
positions. I should be allowed to insert some control after some other
control by giving index or name directly which is not possible in Forms.
Any
pointers please??

Microsoft is far ahead than Java in UI area then why these basic
functionalities are not there in APIs?

Help please,

Dec 17 '05 #5
Can you give me the link for GOTDOTNET?

"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:OH**************@TK2MSFTNGP09.phx.gbl...
GotDotNet has some good articles by Chris Anderson on creating layout
managers.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Mahesh Devjibhai Dhola [MVP]" <dh*********@hotmail.com> wrote in message
news:OE**************@TK2MSFTNGP15.phx.gbl...
Hi,
How to achieve effect of LayoutManagers like java has Grid, Flow, Border
etc
layouts in .Net?
The case is: I am creating the form runtime and adding controls on
run-time
so at that time its very hactic to manipulate about other control's sizes, positions etc so there must be easy way to do such things like what Java
LayoutManagers allow without worring the actual positions in pixels. It
allows me to add, insert etc operation without knowing other control's
pixel
positions. I should be allowed to insert some control after some other
control by giving index or name directly which is not possible in Forms.
Any
pointers please??

Microsoft is far ahead than Java in UI area then why these basic
functionalities are not there in APIs?

Help please,


Dec 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by James Carnley | last post: by
8 posts views Thread by Scott | last post: by
1 post views Thread by Magnus Gran-Jansen | last post: by
3 posts views Thread by Chris Dunaway | last post: by
14 posts views Thread by Anoop | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.