导航:
论坛 -> DELPHI技术
斑竹:liumazi,sephil
作者:
2004/1/15 17:33:35
标题:
怎样把光标移到 Memo 上的指定的行和指定的列位置上?
浏览:1483
加入我的收藏
楼主:
谢啦 就象DELPHI中 查找后 只要双击查找栏 就可以定位啦!
----------------------------------------------
-
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2004/1/15 20:18:30
1楼:
啊 偶正准备做的 产品中 也要用到这个 谁知道呀?
----------------------------------------------
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2004/1/17 16:14:10
2楼:
UP 谁知道 偶也很需要呀!?
----------------------------------------------
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2004/1/17 18:37:07
3楼:
up 支持!楼主
----------------------------------------------
作者:
2004/1/18 10:08:26
4楼:
谢谢 bios 的支持! to bios:你真的很厉害,能做内装修,呵呵
----------------------------------------------
-
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2004/1/18 21:15:47
6楼:
sephil 大哥 偶试试, 找不到再找大哥喽
----------------------------------------------
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2004/1/18 22:18:03
7楼:
procedure TViewerForm.GotoLine1Click(Sender: TObject); var I, SkipChars: Integer; begin I:=StrToInt64Def(InputBox('Goto Line ...', Format('Line (1..%d)', [Memo.Lines.Count]), '), 1); if I>Memo.Lines.Count then I:=Memo.Lines.Count; SkipChars := Memo.Perform(EM_LINEINDEX, I-1, 0); Memo.SetFocus; Memo.SelStart := SkipChars; Memo.SelLength := Memo.Perform(EM_LINEINDEX, I, 0) - 1 - SkipChars; end; 试试看
----------------------------------------------
作者:
2004/1/19 8:19:51
8楼:
i'll try it . thank u , bios ! 成了!再次感谢BIOS! 较我先前的方法强多了: si_position:=si_Col-1; for si:=0 to si_Row-1 do inc(si_position,Length(Memo.Lines[si])+2); Memo.SetFocus; Memo.SelStart:=si_position; Memo.SelLength:=0;
----------------------------------------------
-