将滚动条添加到标签 [英] Adding a scroll bar to a label

查看:109
本文介绍了将滚动条添加到标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在userForm上有一个标签,其中的数据是列表形式的.数据长于标签.在不扩展标签的情况下,是否可以向其中添加滚动条?还是还有其他选择?基本上,我想要一个没有滚动条的框,除非列表比该框长,否则会有一个滚动条.

I have a label on a userForm and the data within it is in list form. The data is longer than the label. Without expanding the label, is there a way to add a scroll bar to it? Or is there another option? Basically I want a box that does not have a scroll bar unless the list is longer than the box, then there's a scroll bar.

使用Excel vba userForm

Using Excel vba userForm

推荐答案

您可以使用样式设置为看起来像标签的文本框.将其设置为多行,滚动条设置为垂直.仅当内容超过大小时,滚动条才会显示.

You can used a textbox styled to look like a label. Set it to multiline with scrollbars set to vertical. Scrollbars will only show up if the content exceeds the size.

这篇关于将滚动条添加到标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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