D
d2bishop
Hi,
I am programmatically setting the .Text property of a number of Labels
on my Windows form at runtime, but I am experiencing some very strange
behaviour when I do this. The code I am using is below:
Label1.Text = "8 " & UCase(strOpen) 'strOpen = "Open"
So the text I would expect to see displayed when I run the application
is: "8 OPEN"
However, I am instead seeing the text "OPEN 8".
I can repeat this behaviour on any Label that has a number as its first
character. I have tried deleting the label and re-creating it, changing
the RightToLeft property, changing the TextAlign property, changing the
Font to Courier New, but in every case the same behaviour persists. I
have also tried inserting extra whitespace characters at the beginning
of the string, but this made no difference.
Below are some relevant properties of the Label I am using:
BorderStyle = FixedSingle
Font = Microsoft Sans Serif, 8.25pt
RightToLeft = No
Text = ""
TextAlign = MiddleCenter
UseMnemonic = True
AllowDrop = False
AutoSize = False
I am running Visual Studio .NET version 7.1.3088 with .NET Framework
1.1 version 1.1.4322 SP1. My computer is running WinXP with all the
latest MS patches.
Any help that someone could offer would be very much appreciated.
Thank you,
-Dan Bishop
I am programmatically setting the .Text property of a number of Labels
on my Windows form at runtime, but I am experiencing some very strange
behaviour when I do this. The code I am using is below:
Label1.Text = "8 " & UCase(strOpen) 'strOpen = "Open"
So the text I would expect to see displayed when I run the application
is: "8 OPEN"
However, I am instead seeing the text "OPEN 8".
I can repeat this behaviour on any Label that has a number as its first
character. I have tried deleting the label and re-creating it, changing
the RightToLeft property, changing the TextAlign property, changing the
Font to Courier New, but in every case the same behaviour persists. I
have also tried inserting extra whitespace characters at the beginning
of the string, but this made no difference.
Below are some relevant properties of the Label I am using:
BorderStyle = FixedSingle
Font = Microsoft Sans Serif, 8.25pt
RightToLeft = No
Text = ""
TextAlign = MiddleCenter
UseMnemonic = True
AllowDrop = False
AutoSize = False
I am running Visual Studio .NET version 7.1.3088 with .NET Framework
1.1 version 1.1.4322 SP1. My computer is running WinXP with all the
latest MS patches.
Any help that someone could offer would be very much appreciated.
Thank you,
-Dan Bishop