我可以在组合框或列表控件中放置一条水平线吗? [英] Can I put a horizontal line in a combo box or list control?

查看:20
本文介绍了我可以在组合框或列表控件中放置一条水平线吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个包含组合框控件的 Windows 窗体,我想在某些项目之间放置一条水平线.我已经看到在其他上下文中使用项目列表中的连字符完成此操作,但在这种情况下连字符不执行此操作.我不知道使用此控件是否甚至可能出现水平线.我想要完成的是:

项目 1第 2 项第 3 项_________________项目A

我想我可以简单地在那里放一行连字符,但如果可以的话,一条干净的线会更好.

解决方案

不幸的是,我还没有找到任何标准的干净"解决方案.

我在这个链接.通过一些花哨的工作,您可能会找到一种方法,使其仅在您想要的时候画线.

或者,还有一个包含行分隔符的 CodeProject 组合框.>

I'm building a Windows Form that includes a combo box control, and I wanted to put a horizontal line between certain items. I've seen this done in other contexts using a hyphen in an item list, but a hyphen doesn't do this in this case. I don't know if a horizontal line is even possible with this control. What I am trying to accomplish is something like:

Item 1
Item 2
Item 3
_________________
Item A

I suppose I could simply put a line of hyphens in there, but a nice clean line would be better if it could be done.

解决方案

Unfortunately, I have not been able to find anything that comes standard in the control with "clean" solutions yet.

I found something where you can draw the line between every item at this link. With some fancy work you may be able to find a way of making it draw the line only when you want to.

Alternatively, there is a CodeProject combobox that includes line separators.

这篇关于我可以在组合框或列表控件中放置一条水平线吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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