右边对齐标签不起作用? [英] Right-Aligned of Label is not to work?

查看:95
本文介绍了右边对齐标签不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将TextAlign设置为MiddleRight时,我希望我的Label控件正确对齐,但它不起作用,为什么呢?我该怎么做才能解决它?谢谢。

I want my Label control to right align, when I set TextAlign to MiddleRight, but it is not to work, why is it? What can i do to solve it? Thanks.

推荐答案

尝试将Label的 AutoSize 属性设置为 false。

查看是否有效。
Try setting AutoSize property of the Label to false.
See if it works.


检查3种可能性

1.自动调整property = false(如下所示)解决方案1)

2.检查代码中某些标签的对齐重置/重叠

3.构建应用程序没有错误

<小>您可以使用'改进问题''发表评论'来解决有关同一问题的问题。

快乐编码!

:)
check 3 possibilities
1. Autosize property = false (as given in solution 1)
2. check in code that some where alignment of that label is reset/overlapping
3. build application without error
you can use 'improve question' or 'post comments' for problems regarding same question.
Happy Coding!
:)


几点:

1。更改 AutoSize 属性。默认设置为 True 。将其更改为 False

2.增加标签的大小,知道 TextAlign 工作正常与否。例如,将保证金更改为(15,0,15,0)和大小值更改为(175,36)

3.您需要设置TextAlign属性。 TextAlign可能包含以下任何值,

Couple of points:
1. Change the AutoSize property. Default it is set to True. Change it to False.
2. Increase the size of the label to know, whether the TextAlign is working properly or not. For example, change Margin to (15, 0, 15, 0) and Size value to (175, 36)
3. You need to set TextAlign property. TextAlign might contain any of the following values,
TopLeft    | TopCenter    | TopRight
MiddleLeft | MiddleCenter | MiddleRight
BottomLeft | BottomCenter | BottomRight



默认值为TopLeft。您可以根据需要选择值。


The default value is TopLeft. You can choose the value according to your need.


这篇关于右边对齐标签不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆