473,770 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem adding custom event to richtextbox

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(Contro lStyles.Standar dClick, true);
SetStyle(Contro lStyles.Standar dDoubleClick, true);
}
}
Jul 21 '05 #1
1 1596
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/...fc483c69e43a66

I hope this helps something?

Cor
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1650
by: Dan Brill | last post by:
Hi, I'm sure this issue has been covered before but after searching around I can't find anything which deals with quite the same set of circumstances or suggests an optimal solution. The issue is, broadly, that when I try to write to the Windows Event Log from ASP.NET code I receive a System.Security.SecurityException ("Requested registry access is not allowed").
3
3953
by: Jitender Singh Rawat | last post by:
Hi All, I am currently working on a project, which involves creating a COM Add-in using VB.Net, for MS Word 2003. As usual, I am creating few custom menu buttons under the File and Tool menus. These menu buttons are being created in the OnStartupComplete event and removed in the OnBeginShutdown event of the COM Add-in's connect class. So, as per logic, everytime the Word starts, custom menu
6
412
by: Just Me | last post by:
I need to create a library sub that adds event handlers to a control. Public Shared Sub AddEvent(ByVal qq As Control, By?? ControlMouseMove As ??) So I need to pass the address of the handler or equivalent so that I can AddHandler qq.MouseMove, AddressOf ControlMouseMove Anyone know how to do that?
0
2756
by: Sakharam Phapale | last post by:
Hi All, I am developing my own text editor using RichTextBox control. I don't want to use RichTextBox Undo and Redo functions. Instead of that I want to develop my own algorithm for Undo & Redo, as my application demands it. Because for each word in text, I have associated data and so, require to maintain state of associated data also. Currently, I have developed algorithm which works on each key press. On each key press event, I...
0
1266
by: Mark Denardo | last post by:
Hi, I'm trying to record the text value of a RichTextBox after handling a KeyPressEvent (each time the user types a char). But what I'm seeing is that the value of rtb.Text is equal to the value of the contents of the RichTextBox prior to the event being triggered. For Example, here's the code: Sub x ... AddHandler rtb.KeyPress, AddressOf CellEvent_KeyPress
1
296
by: Henry | last post by:
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...
3
3261
by: J'son | last post by:
Guys, I have created a custom class that derives from DataList so that I can add some custom client side functionality into each new item row (<td>). Heres the class in its simplest form: public class MyDataList : DataList { public string MyValue1 = "alert('Hey there!');"; public string MyValue2 = "alert('Hey there yourself!');";
3
2218
by: Stuart Nathan | last post by:
In VB - Visual Studio 2003 As I understand it, in the KeyDown event of a RichTextBox, I can put If e.KeyCode = Keys.Return then e.Handled = False and this will prevent the Enter key being added to the RichTextBox but it doesn't - any ideas?
1
4592
by: =?Utf-8?B?QW50aG9ueSBRdWVlbg==?= | last post by:
Hello All, I have created a custom "field" object in .Net that implements IOleObject. It inherits from "System.Windows.Forms.Label". It also has several public properties that contain data to be recalled later. I have also provided COM identity by exposing ClassID, InterfaceID, and EventsID. I can drop these objects into a RichTextBox using the IRichEditOle interface. They display correctly, save to RTF, and Reload into the Richtextbox...
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10257
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10037
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8931
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.