Mystogan
Mystogan

Reputation: 577

label text moves up

I have labels with texts in a panel. The labels have AutoSize=true and AutoEllipsis=true. Now if I resize the window so that part of the label is hidden - the text seem to move up a few pixels! (If I set AutoSize=false the problem disappears)

Anyone know why, or how to make sure the text stays put?

Upvotes: 2

Views: 2105

Answers (1)

Freelancer
Freelancer

Reputation: 9074

You should set the Anchor properties of the Label to none.

This will keep the label text in middle.

Refer Control.Anchor Property.

OR

Set the MaximumSize property to whatever figures you want to adjust with, so that it can not grow.

Upvotes: 2

Related Questions