473,508 Members | 2,346 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't disable double-click in RichTextBox

JT
Hi,

I want to disable the ability to launch an application that is
embedded in the text of a RichTextBox control. I've seen various
posts that say that doing the following will disable click and double-
click processing:

base.SetStyle(ControlStyles.StandardClick, false);

That did not work.

I can't find a way to intercept the event and cancel it, as in
e.Cancel, like you can do in some event handlers. Many people have
complained that they can't get the double-click to work. Well, I
can't stop it from working.

Any clues?

Thanks,

JT

Oct 6 '07 #1
1 2446
Per your request, I've taken a closer look at this thread. Not sure if
you're going to find my input useful at all. But you did ask. :)

JT wrote:
I want to disable the ability to launch an application that is
embedded in the text of a RichTextBox control.
Perhaps you could be more clear about what that means. Maybe for
someone who does RTF stuff all the time it's obvious, but I don't know
how you embed an application in the text of a RichTextBox control.

As is almost always the case, it would be helpful if you could provide a
concise-but-complete example of code that demonstrates the problem
you're having.

My second thought is that I'm not at all clear that disabling
double-clicking is going to be the right way to deal with this. It's
hard to say for sure, since I obviously don't really understand the
original problem anyway. But note that disabling double-clicking
generally for the control means that you not only have prevented some
specific behavior that (for some reason) you don't want, you also wind
up preventing other behavior that users will expect to work correctly.

This goes hand-in-hand with my previous comment about not playing cowboy
with generally accepted rules of UI design. :)

So, it might be worth exploring other ways to disable this behavior,
than the broad-reaching technique of disabling double-clicks altogether.

That said, it sure seems like it should be possible to disable
double-clicks. But without a good example of the situation you're
trying to prevent, it's difficult to comment on what techniques might work.

Pete
Oct 8 '07 #2

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

Similar topics

1
11419
by: DrTebi | last post by:
Hello, I have the following problem: I used to "encode" my email address within links, in order to avoid (most) email spiders. So I had a link like this: <a...
9
2232
by: Gino Elloso - Philippines | last post by:
Hello, I made a webpage ( @ Geocities Free Webpages ) that contains a mousetrail clock script. I simply copied the script ( including all html tags ) exactly as it was from a source webpage (...
5
5965
by: Bob Bedford | last post by:
I create checkboxes using datas from a database (with PHP). I store all values in an array, as I must pass this value like a Form value. Now, in some cases, when a checkbox is selected, I must...
12
8856
by: Forti2ude | last post by:
Hello, I have a simple form... <form> <select name="foo" multiple> <option value="1">one</option> <option value="2">two</option> <option value="3">three</option> </select>
0
1172
by: John Grandy | last post by:
On a .aspx page I have seen commercial controls that serve as replacements for the <asp:Button> control that immediately disable the button on form submission so that accidental double-clicks (or...
4
2703
by: kschneider | last post by:
Assume there's a form with it's action attribute all set to post to a URL, but without a submit control. Form submission is done via a link and I want to prevent the classic "double submit"....
4
14133
by: Phoe6 | last post by:
Hi all, I am trying to disable the NIC card (and other cards) enabled in my machine to test diagnostics on that card. I am trying to disable it programmatic using python. I checked python wmi and...
82
4539
by: robert bristow-johnson | last post by:
here is a post i put out (using Google Groups) that got dropped by google: i am using gcc as so: $ gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure...
1
4002
by: ebusiness | last post by:
I create a new instance yesterday, now I cannot stop it, or perform any instance level operation like setup db2comm using instance id. The error message is "SQL1092N does not have the authority...
0
2150
by: sainiranji | last post by:
Hi All I have diffrent categories in diffrrent logging purpose and all are working fine...but now my requirment is to disable all at once . The below are change i did for disable all logges...
0
7225
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,...
0
7324
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,...
0
7382
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7495
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5052
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...
0
3181
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1556
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 ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.