1. RichEdit and Win32lib v0.57.11 onwards
- Posted by Derek Parnell <ddparnell at bigpond.com> Sep 18, 2002
- 534 views
Dear win32lib users, as a side-effect of doing some modifications, putStream() (used for RichText fields) no longer clears the control before inserting the new text. What I want to know from you people is whether or not I need to return to the previous behaviour. Specifically, should putStream() clear the field before inserting the new text, or should it just insert the new text at the current cursor position? Can I have a show of "hands" please. ---------------- cheers, Derek Parnell
2. Re: RichEdit and Win32lib v0.57.11 onwards
- Posted by g.haberek at comcast.net Sep 18, 2002
- 520 views
i say yes, we can just call setText( id, "" ) prior to putStream(), right?
3. Re: RichEdit and Win32lib v0.57.11 onwards
- Posted by Derek Parnell <ddparnell at bigpond.com> Sep 18, 2002
- 556 views
Actually, the better way to clear the text would be this ... -- Select all the text. setIndex(RE, {1,0}) -- Replace the selected text with the new stuff. putStream(RE, flag, NewText) In fact, what I might do is allow an additional flag value thus ... putStream(RE, {StreamRTF, ClearText}, NewText) that will automatically clear the existing text first. 19/09/2002 12:58:03 PM, g.haberek at comcast.net wrote: > >i say yes, we can just call setText( id, "" ) prior to putStream(), right? > > > > --------- Cheers, Derek Parnell ICQ# 7647806
4. Re: RichEdit and Win32lib v0.57.11 onwards
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Sep 18, 2002
- 540 views
I dunno, I think setText( id, "" ) is much simpler & since it can be used to clear other controls too, it would seem easier to remember than a new flag? However you do it, being able to *either* add to existing text *or* clear & start anew is desirable, I would think. Dan Moyer ----- Original Message ----- From: "Derek Parnell" <ddparnell at bigpond.com> To: "EUforum" <EUforum at topica.com> Subject: Re: RichEdit and Win32lib v0.57.11 onwards > > Actually, the better way to clear the text would be this ... > > -- Select all the text. > setIndex(RE, {1,0}) > -- Replace the selected text with the new stuff. > putStream(RE, flag, NewText) > > > In fact, what I might do is allow an additional flag value thus ... > > putStream(RE, {StreamRTF, ClearText}, NewText) > > that will automatically clear the existing text first. > > > 19/09/2002 12:58:03 PM, g.haberek at comcast.net wrote: > > > > >i say yes, we can just call setText( id, "" ) prior to putStream(), right? > > > > > --------- > Cheers, > Derek Parnell > ICQ# 7647806 > > > >