TIP: Click on subject to list as thread! ANSI
echo: delphi
to: MATHEAS MANSSEN
from: GARY WEINFURTHER
date: 1996-10-17 19:40:00
subject: Problems with TMemo.Seltext?

Matheas Manssen mentioned this to All:
 MM> Memo.seltext:='*'+Memo.seltext+'*';
 MM> This works fine for small strings, but when using string > 256 chars(I
 MM> think), the first 256 chars of the selected text stay on the screen, but
 MM> the rest disappears... :-(( What am I doing wrong?
The problem is that SelText returns a string... which can only be up to 255 
characters.  Instead, you will have to use GetTextLen and GetTextBuf to 
retreive the text to a buffer you allocate yourself, and SetText to assign 
the modified text to the control.
                                ...Gary
--- GoldED 2.41
---------------
* Origin: Nobody expects the Flying Circus BBS! (1:2410/905)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.