473,238 Members | 2,444 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Anchor/dock property

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
2 8049

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Richard Brown | last post by:
Ok, I celebrate and rejoice in the Anchor property. So wonderful compared to the horrible 'resize' code I had to write in VB6, there is just no end to the wonders of VB.NET..... uh, ok..... BUT......
4
by: CJ Taylor | last post by:
Hey, how do I use the anchor property? I have it set to Top, Left, but when I expand the form, it doesn't grow with it... What am I missing? Thanks, CJ
8
by: scorpion53061 | last post by:
I have a datagrid that I create dynamically in code and want it to appear when a link label is clicked. The form loads in maximized view. When the datagrid appears though I have anchored it to...
2
by: Frank Rizzo | last post by:
This maybe a very simple question, but i can't find the answer. I placed a button dead center in the middle of the form. How do I anchor it (or dock it or whatever), so that it always remains in...
1
by: Pierre Marie | last post by:
Hi, I am new to DotNet.vb, so don't be suprise.... Is there a way to "anchor" Web components to a page/ For example, i put 2 Btn on the bottom right of my design page. is it possible to move...
0
by: myPosts | last post by:
Hi all, I am having problem at a time of using datagrid in c#.net. On currentcell change event of datagrid i am displaying one combobox and setting location of combobox depending on location...
7
by: Zytan | last post by:
I just wanted a little practice with the WebBrowser control, so I did the VB guided tour example here in C#: http://msdn2.microsoft.com/en-us/library/a08t4ke7(VS.80).aspx The tutorial asks to put...
3
by: Joseph Gruber | last post by:
Hi all -- I have two questions. First, I'm adding a control to my form at runtime and the control/form seems to ignore the anchor property of the runtime control. Any idea how I can get a...
10
by: Rotsey | last post by:
Hi, I have a Listbox in a Panel of SplitContainer. I want to anchor it so the listbox grows/shrinks vertically with the resizing the splitcontainer. This is my code What happens is it...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.