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

Align autosize labels on the right

P: n/a
Hello everybody,

A couple of years ago I wrote a program in VB6. Using the designer I could
align my labels to the right. When the text of the labels would change, the
autosize feature would kick in and resize the lables to the left.
But with vb.net it isn't possible anymore to get the labels aligned right
using Format -> Align -> Right and stay like that at runtime.
I tried using the anchor, docking and tablelayout panel, but none of these
things work.
Does somebody know a better solution?
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi,

You will have to align the labels with code in the labels text
changed event.

Ken
-------------------
"ZippyV" <do**@mail.me> wrote in message
news:uE**************@TK2MSFTNGP09.phx.gbl...
Hello everybody,

A couple of years ago I wrote a program in VB6. Using the designer I could
align my labels to the right. When the text of the labels would change, the
autosize feature would kick in and resize the lables to the left.
But with vb.net it isn't possible anymore to get the labels aligned right
using Format -> Align -> Right and stay like that at runtime.
I tried using the anchor, docking and tablelayout panel, but none of these
things work.
Does somebody know a better solution?

Nov 21 '05 #2

P: n/a
Thanks, I was already afraid that would be the answer.

"Ken Tucker [MVP]" <vb***@bellsouth.net> schreef in bericht
news:Oa**************@tk2msftngp13.phx.gbl...
Hi,

You will have to align the labels with code in the labels text
changed event.

Ken
-------------------
"ZippyV" <do**@mail.me> wrote in message
news:uE**************@TK2MSFTNGP09.phx.gbl...
Hello everybody,

A couple of years ago I wrote a program in VB6. Using the designer I could
align my labels to the right. When the text of the labels would change, the autosize feature would kick in and resize the lables to the left.
But with vb.net it isn't possible anymore to get the labels aligned right
using Format -> Align -> Right and stay like that at runtime.
I tried using the anchor, docking and tablelayout panel, but none of these
things work.
Does somebody know a better solution?

Nov 21 '05 #3

P: n/a
Ken,

You will have to align the labels with code in the labels text
changed event.

Are you sure of that, I use the Anchor with success in this kind of
operations.

There should be something that I oversee in this question?

Cor
Nov 21 '05 #4

P: n/a
Hi,

The anchor property only moves the control when the form is resized.

Ken
-----------------
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Ken,

You will have to align the labels with code in the labels text
changed event.

Are you sure of that, I use the Anchor with success in this kind of
operations.

There should be something that I oversee in this question?

Cor

Nov 21 '05 #5

P: n/a
Ken,

For me it rezises when I set the top, left and right side.

Cor
The anchor property only moves the control when the form is resized.

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.