Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have noticed an alignment error on this pc when using labels, this problem also occured on the other win2k machine in the office, but not the WinXP ones. essentially what i did was create a new application and added 2 labels.

I made both labels the same size, one above the other and set the text values as follows.

 

Label1.Text = "Label1"

Label2.Text = "This is a label test to check alignment"

 

i then set the TextAlign value of both to MiddleRight.

 

When i run this application (and indeed in VisualStudio) the text does not align perfectly on the right hand side. "Label1" is further to the right than the other string, this is made more obvious if you turn on the label border.

 

When the same application is ran on the WindowsXP machines in this office they are identical (as you would expect them to be). I was wondering if anyone else with win2k can replicate this error...

 

any feedback would be welcome

Anybody looking for a graduate programmer (Midlands, England)?
  • *Experts*
Posted

This is a semi-known issue with GDI+. It becomes *really* bad when you make a label bold and right aligned. I haven't heard if MS is planning on fixing it or not, but I noticed the bold/right align problem almost 2 years ago.

 

-nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted
ahh ok, thanks for the confirmation, I wasn't sure if there was just something up with these 2 pc's it just seemed odd that it worked fine in Windows XP.
Anybody looking for a graduate programmer (Midlands, England)?
  • *Experts*
Posted

I've seen the issue on a number of different machines, including WinXP (my right aligned bold problem) as well as Win2000. It's annoying and makes certain things look unprofessional. It's too bad, because aside from writing your own Label control (it's own Paint event), there's not much you can do except wait for MS to "fix" GDI+.

 

-nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...