473,795 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Align autosize labels on the right

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
5 4099
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******** ******@TK2MSFTN GP09.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
Thanks, I was already afraid that would be the answer.

"Ken Tucker [MVP]" <vb***@bellsout h.net> schreef in bericht
news:Oa******** ******@tk2msftn gp13.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******** ******@TK2MSFTN GP09.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
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
Hi,

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

Ken
-----------------
"Cor Ligthert" <no**********@p lanet.nl> wrote in message
news:%2******** ********@TK2MSF TNGP12.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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
100411
by: Craig Thomson | last post by:
How can I have some text aligned to the left of the page and some more text aligned to the right using only CSS without a table? SPAN doesn't have any alignment, and there is only a single DIV block per line, and so only one alignment. TIA Craig
0
1107
by: PJ | last post by:
I have two blocks, one aligned to the left and one aligned to the right. I'm having issues getting the left block aligned to the bottom when the content height is less than that of the right block. How do I accomplish this w/out using a table? Thanks. - PJ <div class="clearfix"> <div class="floatleft"> <p>some text that I'd like bottom aligned with Link 3</p> </div> <div class="floatright">
24
19967
by: Mike Otten | last post by:
Any help greatly appreciated. The validated page is at: http://myweb.stedwards.edu/michaelo/ddtab.htm The trouble is with the radio buttons (2/3-down the left column). The radios are displaying a line above their respective labels. Here are the html and css snippets: <fieldset class="radio"> <legend>Credit card</legend>
2
4098
by: Berlin Brown | last post by:
This is a simple div/layout question. I could easily solve the problem with a table, but I don't want to do that. I have a row of links. I want row 1 to have links and row 2 to have links. I want both to align such they are on the right (edge up to the right). Here is my code or one variation of it. <div style="float: right; text-align: right;" id="row1">
4
8218
hgeithus
by: hgeithus | last post by:
Hi. Description of problem: I'm using this CSS-template to build a website: http://www.glish.com/css/7.asp (scroll down at the site to see the full code of the template). What I did was to create a new CSS element like this: .langbar { font-size:12px; text-align:right; }
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10448
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10167
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9046
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2922
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.