A arong Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-21 #1 怎样在delphi中memo控件中定位光标,就像写字板中查找字符串查找成功时, 把查找到的字符串变成兰色。请各位高手指点迷津,越快越好,本人有急用。
C cAkk Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-21 #2 memo1.selstart:= memo1.sellength:=
G g622 Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-21 #3 要用richedit,否则,上下一翻动,你得重绘。 richedit.selstart:=0 richedit.sellength:=2 richedit.selattribute(?属性名记不住了):=clred; 把开始的两个字符变成红色。
要用richedit,否则,上下一翻动,你得重绘。 richedit.selstart:=0 richedit.sellength:=2 richedit.selattribute(?属性名记不住了):=clred; 把开始的两个字符变成红色。
G g622 Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-21 #7 用richedit可以记录每个字符的font.所以如果窗体失去焦点,兰色区域还存在
P Pipi. Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-21 #8 还要发个 EM_SCROLLCARET 消息给该 edit 控件 才会把光标所在位置翻出来
B beta Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-22 #9 richedit.Selstart:=0; richedit.Sellength:=2;//先选定前两个字符 richedit1.SelAttributes.Color:=clRed;//设定属性 ~~~~~~~~~~~~~~~~~~~ richedit1.Perform(EM_SCROLLCARET,0,0);
richedit.Selstart:=0; richedit.Sellength:=2;//先选定前两个字符 richedit1.SelAttributes.Color:=clRed;//设定属性 ~~~~~~~~~~~~~~~~~~~ richedit1.Perform(EM_SCROLLCARET,0,0);
L liuly Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-22 #10 with RichEdit1do begin SelStart :=FindText('yourword',0,GetTextLen,[stWholeWord]); SelLength := 8; SelAttributes.color:=clBlue; SelLength:=0; end;
with RichEdit1do begin SelStart :=FindText('yourword',0,GetTextLen,[stWholeWord]); SelLength := 8; SelAttributes.color:=clBlue; SelLength:=0; end;