Adding click event to generic control?

S

Stephen Lambie

Hi,

I want to develop a custom checkbox. I want to use the existing checkbox
in a custom control where I use the disabled state as a third state. I
need to be able to detect mouse or click events in the disabled checkbox
or the parent custom control.

Is this possible? How does a control like a button control implement
event trapping like a click event?

Thanks for your time.
 
A

Andrew de la Harpe

You need to include some client side scripting to handle the the disabled
state.
For example, add an attribute ( eg state ) to your custom control.
Check the attribute on each click. If disabled return false.

A
 
S

Stephen Lambie

How do I detect a click if the custom control does not have a click
event? A disabled checkbox does not fire any events if disabled. This is
why I need to detect clicks in the parent class/control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top