Cags Posted June 7, 2004 Posted June 7, 2004 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 Quote Anybody looking for a graduate programmer (Midlands, England)?
*Experts* Nerseus Posted June 7, 2004 *Experts* Posted June 7, 2004 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 Quote "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
Cags Posted June 8, 2004 Author Posted June 8, 2004 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. Quote Anybody looking for a graduate programmer (Midlands, England)?
*Experts* Nerseus Posted June 8, 2004 *Experts* Posted June 8, 2004 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 Quote "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
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.