Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个WinForm带有一些文本和图像的标准按钮。它看起来像这样:
WinForm
如何设置按钮以使图像与文本的左侧对齐?我试过ImageAlign了,但这似乎没有考虑到按钮的文本。
ImageAlign
刚找到。
你需要设置:
ImageAlign至MiddleRight
MiddleRight
TextImageRelation至ImageBeforeText
TextImageRelation
ImageBeforeText
TextAlign作为MiddleCenter
TextAlign
MiddleCenter
为此,您可以使用TextImageRelation属性将其设置为ImageBeforeText:
指定图像在控件文本之前水平显示。