MouseClick event not fired for disabled or read-only fields?
I'm using .NET C# there. I have a textbox. I assigned 开发者_如何学Pythonit a MouseClick event.
Normally the event is fired when I click the control.
But if I set the textbox's [Enabled=false] or [ReadOnly=true] properties, the MouseClick event is not fired.
How can I fix it?
Thanks.
clearly disabling the control is the issue, you could leave it enabled and not read-only then in the KeyPress/KeyDown event you avoid/cancel any input so the user cannot change the content.
精彩评论