Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2004

Tip: Looking for answers? Try searching our database.

label right alignment bug - LabelRightAlignBug.zip [0/1]

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Randy Danielson - 15 Jul 2004 19:55 GMT
Hello,

I put several labels on a form, set all their left positions in the same
spot, set textalignment to middleright, and set their text values ending
with a :

I noticed that the colons did not line up on the right and found that
the number of characters in the text property of the label is the
determining factor.

I have attached a sample.

Thanks
Randy
Herfried K. Wagner [MVP] - 15 Jul 2004 22:34 GMT
* Randy Danielson <no_freakin_spam@sickofit.com> scripsit:
> I have attached a sample.

I am not able to see an attachment.  Maybe you forgot to add it, or it
has been removed by the news server.

Instead of posting the attachment to the group, consider uploading it
somewhere and post the URL to the file instead.

I didn't see your sample, but I assume that it has something to do with
GDI+'s bad rendering of text or/and in combination with your graphics
hardware.

Signature

Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/

Christoph Nahr - 16 Jul 2004 06:09 GMT
>I put several labels on a form, set all their left positions in the same
>spot, set textalignment to middleright, and set their text values ending
>with a :

I wasn't able to see the attachment either, but did you set the width
of the labels to the same value, too? And did you turn off Autosize?
Signature

http://www.kynosarges.de

Jim Idle - 30 Jul 2004 22:29 GMT
> >I put several labels on a form, set all their left positions in the same
> >spot, set textalignment to middleright, and set their text values ending
> >with a :
>
> I wasn't able to see the attachment either, but did you set the width
> of the labels to the same value, too? And did you turn off Autosize?

ACutally this is trivial to reproduce so I don't think the attachment is necessary. Just create a new windows application project, then add a label. Set it to no autosize, right {middle|top|bottom}. Copy and paste, then make sure the left postion is exactly the same (everything else the same bar the top position). Now change the text (using the : at the end helps to see it). They don;t align. If you change the font, it gets better or worse, same with the point size. Seems like a bug in the way it calculates the start point when drawing it.

HOwever, I did wonder myself if I was misundersntading the purpose of right align in lables. But I can't think of another interpretation off-hand.

Jim

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.