views:

440

answers:

2

Hi, How can I disable standard behaviour when choosing checkbox`s label. Now when I click on label checkbox change its state.

Thanks

+3  A: 

you could have a check box with no text and then a label next to it.


You could wrap this up in a user control / control to make things a little neater.

Hath
While this would work, it also requires more effort than is necessary for no good reason. There is a better way of doing this.
baeltazor
thevillageidiot posted the same question and was accepted. I believe this is a valid option, not ideal but gets the job done.
PoweRoy
@baeltazor - more effort than overriding the natural expected behaviour of a checkbox?
Hath
A: 

This is inherent behavior. You can pass empty string as label text and put a label beside checkbox. Or you can create composite control with Checkbox with empty text and a label with the text intended for checkbox's label.

TheVillageIdiot