一个复选框列表中有两个复选框
我目前正在致力于将应用程序从访问权限转换为 C#,并且遇到了一个需要复制的奇怪控件。在访问中,有一个复选框列表,用于用户正在查看的当月,其中包含该月的每一天,旁边有两个复选框,D 和 N(表示白天和夜晚)。所以我的问题是实现这一点的最佳方法是什么。我正在考虑以编程方式创建它,并排放置两个复选框列表,但想知道是否可以将两个框放在一个列表中
June 1 [D] [N]
...
June 31 [D] [N]
I am currently working on converting an application from access to C# and have come across an odd control I need to replicate. In access there is a list of check-box's, for the current month the user is looking at, which has everyday of that month with two check-box's beside it, D and N (for day and night). So my question is what would be the best way to implement this. I am thinking of creating it programatically with two check-box lists side by side but wondering if you can put two box's in one list
June 1 [D] [N]
...
June 31 [D] [N]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 DataGridView 并创建两个其中的复选框列
You could use a DataGridView and create two CheckBoxColumns in it
如果您确实想保持确切的外观和感觉,可以将两个复选框与单独的 Label 控件并排使用,然后将它们弹出 DataRepeater 为每行数据重复它们。
但是,使用
If you really want to maintain the exact look and feel, you can use two checkboxes side by side with a separate Label control, then pop them in a DataRepeater to repeat them for each row of data.
However, using a DataGridView with two checkbox columns will be much easier.