RepeatDirection物业的CheckedListBox C# [英] RepeatDirection Property for CheckedListBox C#

查看:146
本文介绍了RepeatDirection物业的CheckedListBox C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我很困惑在这里。我想我的multilined 的CheckedListBox 要水平排序。我做了一些研究,它是所有通往 RepeatDirection 属性。在例MSDN

so I'm very confused here. I want to make my multilined CheckedListBox to be sorted horizontally. I've done some research and it is all leading to the RepeatDirection property. Example in the MSDN

但我没有一个网页,我不知道任何XML。我不能只是以某种方式使用该属性对的CheckedListBox 控制? MSDN的人说,它已经作为他们只是写了一个控件的属性:

But I don't have a web page and I don't know any XML. Can't I just somehow use this property for the CheckedListBox Control? The MSDN people say it is already a property of that Control as they simply have written:

public virtual RepeatDirection RepeatDirection { get; set; }



我似乎无法理解如何在我的代码实现这个!提前
谢谢

I just can't seem to understand how to implement this in my code! Thanks in advance.

编辑:我没有一个Web表单!这是一个 System.Windows.Forms的项目。我只是标记的网络控制,因为 RepeatDirection 属性似乎在 System.Web.UI.WebControls 命名空间的存在。

I don't have a web form! It is a System.Windows.Formsproject. I just tagged web-controls because the RepeatDirection property seems to exist in the System.Web.UI.WebControls namespace.

推荐答案

简短的回答:不能。列表框作为Windows窗体实现不支持水平重复。您没有使用该控件的网页版,所以你不能使用网页版的选项。

Short answer: You can't. ListBox as implemented in the Windows Forms does not support repeating horizontally. You aren't using the web version of the control, so you can't use the web version's options.

如果你仍然需要水平显示您的选择,您将需要使用不同的控制。根据您的要求,一个DataGridView应该能够做到你想要什么,有一些调整。

If you still need to display your options horizontally you will need to use a different control. Depending on your requirements, a DataGridView should be able to do what you are wanting, with some tweaking.

这篇关于RepeatDirection物业的CheckedListBox C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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