1. Win32lib richedit bug!
- Posted by aku saya <akusaya at gmx.net> Oct 06, 2003
- 357 views
------------2712CE417301E24 Try the attached file. I'm using win32lib 59.1. 1. Fill in 60000 and check StreamRTF, and click OK. See at the bottom of the RichEdit. The number is truncated. 2. Uncheck StreamRTF and click OK again. See at the bottom of the RichEdit. Now the number is not truncated (000059991 still can be seen). 3. Now fill in 200000 and check StreamRTF, click OK. The number is truncated at 0000600.. 4. Uncheck StreamRTF, click OK. Works well. 5. Check StreamRTF, click OK. Also works well. It seems that if StreamText is selected (StreamRTF is not checked), the buffer for the RichEdit will be allocated, but not when StreamRTF is selected. How to fix it? I saw the source code but I don't understand. Thanks! ------------2712CE417301E24 Content-Type: APPLICATION/OCTET-STREAM; name="tesrtf.exw"
2. Re: Win32lib richedit bug!
- Posted by Derek Parnell <ddparnell at bigpond.com> Oct 07, 2003
- 367 views
----- Original Message ----- From: "aku saya" <akusaya at gmx.net> To: "EUforum" <EUforum at topica.com> Subject: Win32lib richedit bug! > > Try the attached file. I'm using win32lib 59.1. > > 1. Fill in 60000 and check StreamRTF, and click OK. > See at the bottom of the RichEdit. The number is truncated. > > 2. Uncheck StreamRTF and click OK again. > See at the bottom of the RichEdit. Now the number is not truncated > (000059991 still can be seen). > > 3. Now fill in 200000 and check StreamRTF, click OK. > The number is truncated at 0000600.. > > 4. Uncheck StreamRTF, click OK. Works well. > > 5. Check StreamRTF, click OK. Also works well. > > It seems that if StreamText is selected (StreamRTF is not checked), > the buffer for the RichEdit will be allocated, but not when StreamRTF > is selected. > > How to fix it? I saw the source code but I don't understand. > Add this line, just before calling putStream() .. LimitText(RichEdit6, length(txt)) By default the limit is 32K. This gets automatically changed, apparently, when not doing SreamRTF. So to set the limit you really want, call LimitText() just prior to streaming in data. -- Derek