全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1572
推到 Plurk!
推到 Facebook!

Memo上游標所指的是Memo上的行數

答題得分者是:dllee
valex1377
一般會員


發表:3
回覆:2
積分:1
註冊:2007-01-23

發送簡訊給我
#1 引用回覆 回覆 發表時間:2007-09-24 12:37:03 IP:140.115.xxx.xxx 訂閱
各位先進:
我想要在Memo上,按下滑鼠左鍵,會得到游標指的Memo上第幾行.該怎麼去得到第幾行呢??
謝謝
valex 敬上
dllee
站務副站長


發表:321
回覆:2519
積分:1711
註冊:2002-04-15

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-09-24 14:16:17 IP:59.105.xxx.xxx 訂閱
試試 TMemo 的 CaretPos 屬性。

線上說明(BCB5 Online Help)的資料如下:

TCustomMemo::CaretPos

Indicates the position of the caret in the client area of the memo.

__property Windows::TPoint CaretPos = {read=GetCaretPos};

Description

Use CaretPos to determine the coordinates of the cursor. CaretPos indicates the X and Y position (in terms of lines and characters) relative to the client origin of the memo.

To determine the position of the caret in terms of characters of text only (rather than X/Y location), use the SelStart property.


Seednet ShareMe 免費網路硬碟, 申請送2G, 用 MSN 幫她打廣告加 10G, 推薦1人加 1G, 活動只到 9 月底, 請把握時機
------
http://www.ViewMove.com
valex1377
一般會員


發表:3
回覆:2
積分:1
註冊:2007-01-23

發送簡訊給我
#3 引用回覆 回覆 發表時間:2007-09-25 15:12:59 IP:140.115.xxx.xxx 訂閱
謝謝...問題已經解決了
系統時間:2024-05-03 16:22:51
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!