简体   繁体   中英

AutoSize vertically while AutoEllipsis horizontally on label control

I want to place a label on the bottom left corner of an user control. The control may vary in size by horizontally and vertically. When the horizontal resize is reduced so that the label cannot be shown fully, I want the AutoEllipsis to kick in. But on the other hand, I dont want my control floating from the left bottom, because the height of the label is not autosized (which makes the text stay above a few pixels higher than autosized label).

So I want to know how to set AutoEllipsis horizontally but keep AutoSize vertically on a label control. Help me out.

AutoSize = true; AutoEllipsis = falseAutosize = false; AutoEllipsis = true

Try to set these properties for the label:

AutoEllipsis = true
Anchor = Top, Bottom, Left
AutoSize = false

Update: Try these properties:

AutoEllipsis = true
TextAlign = TopLeft
Anchor = Bottom, Left, Right
AutoSize = false

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM