O o*o Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-28 #2 SendMessage(Memo1.Handle,EM_LINESCROLL,x,y);
陆 陆波 Unregistered / Unconfirmed GUEST, unregistred user! 2000-03-05 #3 对不起,因为很难上到这个站现在才更正, 我的意思是在MEMO控件中找到某些所要的文字,然后定位,不是直接定坐标。
P Pipi. Unregistered / Unconfirmed GUEST, unregistred user! 2000-03-05 #4 var p:integer; p:=Pos('你要找的字符串',memo.Text); if(p>0)then begin memo.SelLength:=0; memo.SelStart:=p; PostMessage(Memo.Handle,EM_SCROLLCARET,0,0); end;
var p:integer; p:=Pos('你要找的字符串',memo.Text); if(p>0)then begin memo.SelLength:=0; memo.SelStart:=p; PostMessage(Memo.Handle,EM_SCROLLCARET,0,0); end;
阿 阿蒙 Unregistered / Unconfirmed GUEST, unregistred user! 2000-03-05 #5 varLineNum:longint; CharsBeforeLine:longint; begin LineNum=SendMessage(Memo1.Handle,EM—LINEFROMCHAR,Memo1.SelStart,0); CharsBeforeLine:=SendMessage(Memo1.Handle,EM—LINEINDEX,LineNum,0); Label1.Caption:=′Line′+IntToStr(LineNum+1) Label2.Caption:=′Position′+IntToStr((Memo1.SelStart-CharsBeforeLine)+1); end;
varLineNum:longint; CharsBeforeLine:longint; begin LineNum=SendMessage(Memo1.Handle,EM—LINEFROMCHAR,Memo1.SelStart,0); CharsBeforeLine:=SendMessage(Memo1.Handle,EM—LINEINDEX,LineNum,0); Label1.Caption:=′Line′+IntToStr(LineNum+1) Label2.Caption:=′Position′+IntToStr((Memo1.SelStart-CharsBeforeLine)+1); end;