By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,473 Members | 3,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,473 IT Pros & Developers. It's quick & easy.

Anchor/dock property

P: n/a
I have a forms application which has many controls such as
buttons,labels,listviews,text boxes etc.
If you set the window size to maximum size so that it would expand to
the size of the screen the controls tend to move without any
proposion. So then I used anchor and the dock property. I could get
some or most of them to appear correctly, but say you have to list
boxes in the middle of the screen one after the other vertically how
could you use anchor or dock property.
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"James" <ja*****************@yahoo.com.au> wrote in message
news:e6**************************@posting.google.c om...
I have a forms application which has many controls such as
buttons,labels,listviews,text boxes etc.
If you set the window size to maximum size so that it would expand to
the size of the screen the controls tend to move without any
proposion. So then I used anchor and the dock property. I could get
some or most of them to appear correctly, but say you have to list
boxes in the middle of the screen one after the other vertically how
could you use anchor or dock property.


The anchor and dock properties are very useful, but they can't handle all
situations. Your description isn't really enough to understand what you are
trying to do, but it sounds like you may have to handle moving and sizing
yourself.

The anchor property locks the position of the control to whichever sides you
anchor it to, and it is not proportional. The dock property is a bit more
complex, and I don't understand it well enough to give a simple and thorough
explanation of it, but I've used it mostly to make a control fill an area's
width, to a certain height, or height to a certain length.

These properties help immensely with basic resizing and repositioning
problems, but they aren't the be all end all. Look up resize events, or
state your problem again in more detail. Maybe I can help, and I'm sure
others could help more. So, what's on your form, what should it look like,
and what does it look like?

Eric
Nov 15 '05 #2

P: n/a
Thank you for your reply.

In my case the upper part of the form has a lot of labels randomly
placed everywhere. Say 6 labels to the right side and 10 to the left.
Then to bottom of those labels there is a group box which contains a
listview and below that a lot of labels again. And to the bottom of
all this there is a rich textbox control. Since my appliaction would
run on different kind of screen sizes I need to figure out a way to
propotionaly lay out all the controls.

Thanks again
Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.