Martin Mulder
Martin Mulder

Reputation: 12944

System.Windows.Forms.Label.Text contents displayed incorrectly

I have a winform with a label. The label has property Text set to abc(123):

In the designer, the text of the label is viewed as :(123)abc.

What is the cause of this?

Some background information:

This application worked correctly for years till it was moved from the an old server (Win2003 / 32-bit) to a new server (Win2008 / 64-bit).

The solution was created on an old development-PC (VS2008 / WinXP / 32-bit) and shows the same problem on the new development-PC's (VS2012 / Win8.1 / 64-bit).

Upvotes: 0

Views: 443

Answers (1)

Martin Mulder
Martin Mulder

Reputation: 12944

I found the solution!

The controls and labels were places on a TabControl. The original programmer wanted to display the tabs on the right side of the screen, so set the property RightToLeft to Yes and RightToLeftLayout to True.

Somehow, on the old systems, this results only in tabs being drawn on the right side. On the new systems this ALSO leads to displaing all its containing labels / textboxes / etc. from right to left instead of left to right. Somehow they now inherit the settings of the parent control.

Upvotes: 1

Related Questions