Anchor/dock property

J

James

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.
 
G

Guest

Hi james

if you are using 5 boxes in the center of the screen and there are other boxes around those 5 try that way

- put a pane in the cente
- set the 5 boxes inside this pan
- set pane docking style to "fill
- set the two first boxes docking style to "top
- set the third box docking style to "fill
- set the last box docking style to "bottom

you can have allways more than one box with top or bottom style in docking but just one with fill

the reason therefore is the z-order of the boxes and the calculation of the layout. This is done by calculationg first the top boxes, then the bottom boxes (all have a fix height) and then the one and only fill box

Hope that helpe

Thoma
 

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

Top