about positioning control on the form

T

Tony Johansson

Hello!

When I use window forms programming it's standard to be able to move the
control to the place where I want them on the form.

I read in a book and it says "If you have used previous versions of Visual
Studio you may remember a feature called grid layout which allowed you to
position elements with abolute coordinates by dragging them where you wanted
them.
Although this model seems convenient it really isn't suited to most web
pages because controls can't adjust their positioning when the web page
content changes(or when text is resized based on user preferences).
This leads to inflexible layout(such as control that overwrite each other)"

Can somebody explain this I mean if I position my control where I want them
how can this cause the controls to overwrite
each other ?
So as a summary I can't see any problem to use absolute positioning meaning
to move my control to the position where I want to have them.

//Tony
 
B

Brian Cryer

Tony Johansson said:
Hello!

When I use window forms programming it's standard to be able to move the
control to the place where I want them on the form.

I read in a book and it says "If you have used previous versions of Visual
Studio you may remember a feature called grid layout which allowed you to
position elements with abolute coordinates by dragging them where you
wanted
them.
Although this model seems convenient it really isn't suited to most web
pages because controls can't adjust their positioning when the web page
content changes(or when text is resized based on user preferences).
This leads to inflexible layout(such as control that overwrite each
other)"

Can somebody explain this I mean if I position my control where I want
them
how can this cause the controls to overwrite
each other ?
So as a summary I can't see any problem to use absolute positioning
meaning
to move my control to the position where I want to have them.

With grid layout its easy to forget that the size of your browser window is
unlikely to be the same as the size of the browser window for your visitors.
This in turn does leads to the sort of problems you've quoted. Typically
problems arise when a visitor has a smaller browser window than you've
designed for.

Its much better to understand how html works and how to layout pages so they
can adjust to the available width of the browser.

Hope this helps.
 
B

Brian Cryer

Naresh Nagubandi said:
by using div or table u can specify the position of control

Whilst there are times when using a table for positioning (or alignment) is
just the best way to do it, in general its better to use divs and css for
alighnment. The practical issue with tables is that the browser won't render
the contents until it has finished reading to the end of the table - which
is a non-issue for small tables but can give the impression of a very slow
to load page when the tables are large.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top