線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1632
推到 Plurk!
推到 Facebook!

richedit的findtext疑問

答題得分者是:Stallion
wishmaster926
初階會員


發表:91
回覆:69
積分:32
註冊:2006-12-13

發送簡訊給我
#1 引用回覆 回覆 發表時間:2007-02-10 13:37:51 IP:218.166.xxx.xxx 訂閱
各位大大:
請問richedit的findtext方法中,serachtype的屬性總共有那幾類!!!!!
目前我只知道有matchcase和wholeword兩種!!!!
有無可不管大小寫或搜尋部份match的type?????
------
~~~~~~~~時時多爬文 勿使惹塵埃~~~~~~~~
~~~~~~~~時時多爬文 勿使惹塵埃~~~~~~~~
~~~~~~~~時時多爬文 勿使惹塵埃~~~~~~~~
Stallion
版主


發表:52
回覆:1600
積分:1995
註冊:2004-09-15

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-02-10 14:41:57 IP:211.22.xxx.xxx 未訂閱
請多用線上說明:(以下節錄自BCB online help)
Searches a given range in the text for a target string.
enum TSearchType { stWholeWord, stMatchCase };
typedef Set TSearchTypes;
int __fastcall FindText(const AnsiString SearchStr, int StartPos, int Length, TSearchTypes Options);
Description
Use FindText to search a range of text in a rich edit control for the string specified by the SearchStr parameter. Only the text in the range starting at the position StartPos and continuing through the next Length positions will be searched. Use Options to specify whether the search should match whole words only and whether the search should be case sensitive. FindText returns the position of the search string, where 0 is the position of the first character in the rich edit control (as opposed to the first position in the search range). If the search string does not appear in the indicated range, FindText returns -1.
Use FindText rather than programmatically searching through the text of the control, to keep from being thrown off by the encoding of rich text characteristics.

http://delphi.ktop.com.tw/board.php?cid=168&fid=912&tid=86786
系統時間:2024-05-06 9:39:17
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!