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

FilesListBox 檔案及目錄清單元件(含程式碼)

 
TATSU
版主


發表:50
回覆:135
積分:62
註冊:2003-01-16

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-05-08 04:22:01 IP:218.102.xxx.xxx 未訂閱
其實這個元件是根據那個舊式的 TFileListBox 建造,不是改造! < src="http://delphi.ktop.com.tw/loadfile.php?TOPICID=15565190&CC=348110"> 1.轉用 Windows 內建的 icon ,改用 virtual list 的方式處理檔案清單。 2.只是讀取目錄內的檔案清單,但不會轉換到該目錄去,舊式的那個 TFileListBox 的做法是先轉換到該目錄,才讀取檔案清單。 3.ico, cur, ani (animated cursor) 及 exe 等的副檔案名其實在 Windows 系統下並沒有一個特定的 icon ,如果每次都要一個個檔案去讀取它的 ICON ,速度一定會慢下來,元件亦有相關的 property 去設定是否讀取這些檔案的 icon 或使用指定的 ICON 。 4.但這個元件沒有跟 TDirectoryListBox 連繫,可以設定 Directory 這個 property 去讀取檔案清單。 FileName, FileSize, FileDate, FileAttribute properties get focused filename/foldername information 讀取現在所選擇的檔案資料 GetFileName, GetFileSize, GetFileDate, GetFileAttribute functions index of item should be passed as paremeter to retrieve information otherwise index of the FOCUSED one will be used instead. 如果呼叫這幾個功能時沒有放入參數,只會讀取所選擇案的資料 DisplayName property GetDisplayName function deal with special items(I.E. bookmark) The I.E. bookmark file has a filename extension of .url. The display name only shows the filename part, omit the extension art. 這個主要是處理 I.E. 那些 bookmark 檔案,顯示時不會將不會顯示 .url 的副檔案名。 GetFiles, GetSelected retrive a list of files/selected files and save in a TStrings. Any contents in the list passed as parameter will not be cleared. It only adds filename(s) to the end of the list. 這兩個功能是一次過提取清單內的檔案(或選擇了的檔案),但呼叫時必須 要放入一個 TStrings 令到元件可以將檔案清單存入,但元件不會清除 TStrings 內的資料,只會將檔案名稱加進去。 如果想在 Windows XP 環境下顯示那些 high color 的 icon ,連結程式檔案 時,請加入 winxp.res 檔案,但在 Delphi IDE 環境下,那些 icon 仍然會 顯示出黑色的邊框。 其實希望下一版本可以支援 1.讀取 UNICODE 檔案名稱 2.解決那些捷徑檔案 Shortcut file(.lnk)的處理 離線閱讀程式 發表人 - tatsu 於 2004/05/08 04:24:11
附加檔案:49731_FilesListBox.rar
系統時間:2024-06-23 11:25:35
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!