Problem adding custom event to richtextbox

G

Guest

I inherited a richtextbox class and tried to add the double click even
handler. Unfortunatly, when I check the properties of rtbText, it doesn't
contain a double click event handler. Any ideas on what I did wrong or how i
can add a double click event handler to a richtextbox?

//I declared rtbText as my custom richtextbox
rtbText = new DblClickRich()

//Custom Richtextbox class trying to add double click event handler
public class DblClickRich : RichTextBox {
public DblClickRich() : base() {
SetStyle(ControlStyles.StandardClick, true);
SetStyle(ControlStyles.StandardDoubleClick, true);
}
}
 
C

Cor Ligthert

Henry,

I thought that I had seen your question endless in the newsgroups, however
searching did give me not any result (with a in my opinion good answer).
Maybe because it seems to be not possible.

Here a message from Lion Shi, what at least describes the problem. I think
that you will not be glad with his solution however where not is, this can
be the best.

http://groups-beta.google.com/group/microsoft.public.dotnet.languages.csharp/msg/90fc483c69e43a66

I hope this helps something?

Cor
 

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

Top