简体   繁体   English

C# 复选框列表:如何通过单击 label 来避免更改复选框 state?

[英]C# checkboxlist: How to avoid changing the checkbox state by clicking on the label?

how do I avoid that an item in a C#-checkboxlist can be selected by clicking on the label?如何避免通过单击 label 来选择 C#-checkboxlist 中的项目? So, the state of the checkbox should only be changed by clicking onto the box, but not by clicking on the label.因此,复选框的 state 只能通过单击框来更改,而不是通过单击 label 来更改。

Can anyone please give me a hint?谁能给我一个提示? Thanks a lot in advance.提前非常感谢。

You can create a checkbox without text and add a seperate label next to the checkbox您可以创建一个不带文本的复选框,并在复选框旁边添加一个单独的 label

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM