Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 61511 invoked from network); 24 Jun 2008 13:11:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jun 2008 13:11:15 -0000 Received: (qmail 39542 invoked by uid 500); 24 Jun 2008 13:11:16 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 39513 invoked by uid 500); 24 Jun 2008 13:11:16 -0000 Mailing-List: contact log4net-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET User" List-Id: Delivered-To: mailing list log4net-user@logging.apache.org Received: (qmail 39502 invoked by uid 99); 24 Jun 2008 13:11:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2008 06:11:16 -0700 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [206.83.82.51] (HELO parcel.helicosbio.com) (206.83.82.51) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2008 13:10:26 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C8D5FB.B3955A85" Subject: RE: rich text box and scroll Date: Tue, 24 Jun 2008 09:10:40 -0400 Message-ID: <413BC2C30D426E45A512157E7C9BFB4302615FC5@wildcat.HBSC.local> In-Reply-To: <61FE069E88B10C44AB73B6CDF37A81C30597F1B2@MXCU02MX1.MSX.CIB> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: rich text box and scroll Thread-Index: AcjVybzzYcZSGb0LQDGbPV4s8zSfrQAMH95g References: <61FE069E88B10C44AB73B6CDF37A81C30597F1B2@MXCU02MX1.MSX.CIB> From: "James Katz" To: "Log4NET User" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C8D5FB.B3955A85 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable You will want to make the text of the RTB follow the tail of the log. In-core storage of text is VERY co$tly. If you're using a C# or Java RTB, you assign its Text property the whole string you want. You generally can't just add the newest line to the existing text. Also the +=3D implementation for strings in those 2 languages are wicked = expensive. =20 So given that you will have to pause and recalculate the contents of the text box when some number 'n' of new lines comes in, you will have to store the total lines somewhere else anyway. but that's a side issue. =20 you ought to have the RTB enabled, but explicitly trap the MouseDown event in the box. When you do that, you can start the selection process (handling the mousemove and mouse up events). Since most window controls are single threaded, that in and of itself will stop the process of appending text to the window, until you've finished processing the mouseup event. =20 Since you're capturing a mousedown event, you control all the interaction - all you have to do is disregard key events to keep people from typing into the text - the only allowable action is to mousemove until mouseup. That way, you can keep the RTB enabled. =20 HTH, =20 Jim =20 =20 ________________________________ From: Graham Walsh [mailto:graham.walsh-prestataire@calyon.com]=20 Sent: Tuesday, June 24, 2008 3:13 AM To: Log4NET User Subject: rich text box and scroll Hi Hi, =20 Whats the simplest way to make the content of the rich text box "selectable". We have an awful lot of log output going to that window, all of which is needed. Ideally I'd like to freeze the window, select the text and have the RTPappender continue its writing. By default I'd temporarily set the RTB enabled =3D=3D false, select the text and then = set it back to true but that seems a bit luggish. =20 Any tips? =20 Thanks =20 Graham =20 ------_=_NextPart_001_01C8D5FB.B3955A85 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
You will want to make the text of the RTB = follow the tail=20 of the log.  In-core storage of text is VERY co$tly. If you're = using a C#=20 or Java RTB, you assign its Text property the whole string you = want.  You=20 generally can't just add the newest line to the existing text.  = Also the +=3D=20 implementation for strings in those 2 languages are wicked=20 expensive.
 
So given that you will have to pause and = recalculate the=20 contents of the text box when some number 'n' of new lines comes in, you = will=20 have to store the total lines somewhere else anyway.  but that's a = side=20 issue.
 
 you ought to have the RTB enabled, but = explicitly trap the=20 MouseDown event in the box.  When you do that, you can start the = selection=20 process (handling the mousemove and mouse up events).  Since most = window=20 controls are single threaded, that in and of itself will stop the = process of=20 appending text to the window, until you've finished processing the = mouseup=20 event.
 
Since you're capturing a mousedown event, you = control all=20 the interaction - all you have to do is disregard key events to keep = people from=20 typing into the text - the only allowable action is to mousemove until=20 mouseup.  That way, you can keep the RTB = enabled.
 
HTH,
 
Jim
 
 


From: Graham Walsh=20 [mailto:graham.walsh-prestataire@calyon.com]
Sent: Tuesday, = June 24,=20 2008 3:13 AM
To: Log4NET User
Subject: rich text box = and=20 scroll

Hi = Hi,

 

Whats the simplest way to = make the=20 content of the rich text box “selectable”. We have an awful = lot of log output=20 going to that window, all of which is needed. Ideally I’d like to = freeze the=20 window, select the text and have the RTPappender continue its writing. = By=20 default I’d temporarily set the RTB enabled =3D=3D false, select = the text and then=20 set it back to true but that seems a bit = luggish.

 

Any=20 tips?

 

Thanks

 

Graham

 

------_=_NextPart_001_01C8D5FB.B3955A85--