调整标签大小不会更改标签高度 [英] Resizing Label Does Not Change Label Height

查看:61
本文介绍了调整标签大小不会更改标签高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在调整表格大小时如何获得自动调整的标签高度?设置所有属性.对齐在顶部.自动调整大小是正确的.自动换行是真的.

How do you get the label height to automatically adjust when resizing the form? All of the properties are set. Align is top. Autosize is true. Word wrap is true.

当我更改表格大小时,标签会调整标题的精细度.但是,实际标签不会调整其高度.

When I change the form size the label adjust the caption fine. However, the actual label will not resize its height.

当表单宽度增加时,这会留出一个空白,或者使标题的底部不可读.当标签下方的控件应根据标签的高度向上或向下移动时,这会很丑陋.

This leaves a gap when the form width is increasing or it leaves the bottom part of the caption unreadable. Makes it ugly when you have controls below the label that should move up or down depending on the label's height.

我不希望使用表单的resize事件来执行此操作.太糟糕了,没有表单调整大小结束"事件.

I would hate to do this using the form's resize event. Too bad there is no form "resize end" event.

有帮助吗?谢谢.

推荐答案

如果我没记错的话,在 Autosize 设置为 true 的情况下,标签的高度会自动设置到标题中文本的实际高度.

If I recall correctly, with Autosize set to true, the height of the label is automatically set to the actual height of the text in Caption.

您可以尝试将 Autosize 设置为 false ,然后查看它如何为您工作.

You might try setting Autosize to false and see how that works for you.

这篇关于调整标签大小不会更改标签高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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