Brampage
Brampage

Reputation: 6984

How to fix translated text over controls in Winforms?

I have got labels in my Windows Forms application which are placed next to controls.
When I change my language options to another language, the text needs more space now it covers my control.

Are there any ways to fix this problem?

Upvotes: 1

Views: 137

Answers (2)

Dmitry
Dmitry

Reputation: 14059

Also try to use containers to design your forms: TableLayoutPanel, FlowLayoutPanel. Controls that are placed in their cells, are autosized and wordwrapped correctly in most cases.

Upvotes: 1

Crono
Crono

Reputation: 10478

No magic here I'm afraid. You have to try making your labels as (reasonably) wide as possible to accomodate each of your supported languages. Don't use AutoSize property here.

If labels appears on the left, have your text aligned to the right using the TextAlign property. This way they should always appear close to your control without ever overlapping them.

Upvotes: 1

Related Questions