🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.winforms.controls.using
Article #4

Re: 'Trapping' a double-click in RichTextEdit Mouse-down event

#4
From: Marc Rohloff TeamB
Date: Fri, 11 Mar 2005 01:29
19 lines
1834 bytes
On 9 Mar 2005 22:40:24 -0800, John Fowler wrote:

> I have a rich text editbox on a form and when I double-click it, I
> want its text to be copied to myString. However, the program alwaly
> 'freezes' after the FIRST click; thus e.Clicks == 1 is always true
> and I can never click fast enough for e.Clicks ever to be '2'.

> private void rtBox_MouseDown(object sender,
> system.Windows.Forms.MouseEventArgs e) 

Why don't you use the double click event? You can't get at it in the
designer but it is easy enough to set in code:

this.richTextBox1.DoubleClick += new
System.EventHandler(this.textBox1_DoubleClick);

-- 
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
Technical Details
Message-ID: <i3mrg7bj7oqe.dlg@marcrohloff.40tude.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <422febd8$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1eff3c,eb5671884cadb4e5
X-Google-Attributes: gid1eff3c,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Marc Rohloff [TeamB]" <"on request">
Subject: Re: 'Trapping' a double-click in RichTextEdit Mouse-down event
Newsgroups: borland.public.csharpbuilder.winforms.controls.using
User-Agent: 40tude_Dialog/2.0.15.1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
References: <422febd8$1@newsgroups.borland.com>
Date: Thu, 10 Mar 2005 20:29:50 -0500
Message-ID: <i3mrg7bj7oqe.dlg@marcrohloff.40tude.net>
X-Face: "huzh55Xi]!ZNni78>a*5+).`SK?<^q2MlHk-C]Z2M9T@\J5ZCB$95Ey+s"XQuhGFA[eutZ :0^AV!Q;t>gE`1-=8d;HZ6~*o1dH<X9\b$!|(}+I'!Xq)@3Op}%0ArW&nf'Qh*EwR
X-Antivirus: avast! (VPS 0510-0, 03/08/2005), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 4.225.103.251
X-Trace: newsgroups.borland.com 1110504380 4.225.103.251 (10 Mar 2005 17:26:20 -0800)
Lines: 19
X-Authenticated-User: mrohloff
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail