Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
Generalno instantiate Pin
rod termaat4-Feb-04 17:24
rod termaat4-Feb-04 17:24 
GeneralRe: no instantiate Pin
Tom Clement4-Feb-04 17:39
professionalTom Clement4-Feb-04 17:39 
GeneralRe: no instantiate Pin
Not Active4-Feb-04 18:09
mentorNot Active4-Feb-04 18:09 
GeneralRe: no instantiate Pin
boogs5-Feb-04 2:48
boogs5-Feb-04 2:48 
GeneralRe: no instantiate Pin
Heath Stewart5-Feb-04 4:42
protectorHeath Stewart5-Feb-04 4:42 
QuestionRichTextBox has a bug? Pin
Zembaliti4-Feb-04 14:56
Zembaliti4-Feb-04 14:56 
AnswerRe: RichTextBox has a bug? Pin
Nick Parker4-Feb-04 16:50
protectorNick Parker4-Feb-04 16:50 
GeneralRe: RichTextBox has a bug? Pin
Tom Clement4-Feb-04 17:07
professionalTom Clement4-Feb-04 17:07 
I think Zembaliti is assuming that there was something in the undo buffer before these calls. As it happens, this is an acknowledged bug in the RichTextBox control. Even if the RichTextBox has changed, the act of accessing the Text property or the TextLength property completely wipes out the Undo/Redo buffer.

To work around this, you have to use the Win32 API (e.g. EM_GETTEXTEX) to get text, circumventing the Text property. If you want the Text length, you have to send the EM_GETTEXTLENGTHEX message to the control. I derive a new control from RichTextBox and override these properties to make using RichTextBox easier in my code.

You can see an example of using EM_GETTEXTLENGTHEX for this purpose on a RichTextBox in my recent article here. A google search also confirms it.
GeneralRe: RichTextBox has a bug? Pin
Zembaliti5-Feb-04 16:03
Zembaliti5-Feb-04 16:03 
GeneralRe: RichTextBox has a bug? Pin
Tom Clement5-Feb-04 16:17
professionalTom Clement5-Feb-04 16:17 
GeneralRe: RichTextBox has a bug? Pin
Zembaliti5-Feb-04 20:41
Zembaliti5-Feb-04 20:41 
GeneralRe: RichTextBox has a bug? Pin
Zembaliti6-Feb-04 0:25
Zembaliti6-Feb-04 0:25 
QuestionMulti-platform C#? Pin
Kryal4-Feb-04 12:50
Kryal4-Feb-04 12:50 
AnswerRe: Multi-platform C#? Pin
Dmitriy Kostovetskiy4-Feb-04 13:22
Dmitriy Kostovetskiy4-Feb-04 13:22 
GeneralRe: Multi-platform C#? Pin
Gerald Leslie Jones4-Feb-04 20:00
Gerald Leslie Jones4-Feb-04 20:00 
GeneralRe: Multi-platform C#? Pin
Michael P Butler5-Feb-04 2:01
Michael P Butler5-Feb-04 2:01 
GeneralRe: Multi-platform C#? Pin
Heath Stewart5-Feb-04 4:32
protectorHeath Stewart5-Feb-04 4:32 
GeneralCustom WebControl - Rendering Images Pin
Member 6440164-Feb-04 12:26
Member 6440164-Feb-04 12:26 
GeneralRe: Custom WebControl - Rendering Images Pin
krisp4-Feb-04 12:45
krisp4-Feb-04 12:45 
GeneralRe: Custom WebControl - Rendering Images Pin
Nick Parker4-Feb-04 14:38
protectorNick Parker4-Feb-04 14:38 
GeneralString Array written to and parsed from hidden web control Pin
krisp4-Feb-04 12:24
krisp4-Feb-04 12:24 
GeneralRe: String Array written to and parsed from hidden web control Pin
Heath Stewart5-Feb-04 4:22
protectorHeath Stewart5-Feb-04 4:22 
GeneralRe: String Array written to and parsed from hidden web control Pin
krisp5-Feb-04 19:22
krisp5-Feb-04 19:22 
GeneralWeb service question Pin
pankajdaga4-Feb-04 10:24
pankajdaga4-Feb-04 10:24 
GeneralRe: Web service question Pin
Heath Stewart4-Feb-04 10:34
protectorHeath Stewart4-Feb-04 10:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.