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

[問題]請問一下delphi指令的OpenDialog如何一次開啟多個檔呢?

尚未結案
s556989
一般會員


發表:5
回覆:1
積分:1
註冊:2006-07-19

發送簡訊給我
#1 引用回覆 回覆 發表時間:2006-07-20 17:48:01 IP:218.174.xxx.xxx 訂閱
wtfka
一般會員


發表:0
回覆:14
積分:12
註冊:2006-07-13

發送簡訊給我
#2 引用回覆 回覆 發表時間:2006-07-22 19:16:51 IP:221.127.xxx.xxx 未訂閱

you can change the dialogs properties, u can allow multiselect in options

or u can set as:
opendialog1.options := [ofAllowMultiSelect]

wtfka
一般會員


發表:0
回覆:14
積分:12
註冊:2006-07-13

發送簡訊給我
#3 引用回覆 回覆 發表時間:2006-07-23 02:30:55 IP:221.127.xxx.xxx 未訂閱

according to ur email, i can tell u that what can u do with the open dialog

as i said, u can set the properties as "allow mutli select", then u can find the selecting file names (with full file path) in the dialogs' files stringlist, for example:

if opendialog1.execute then
edit1.text := opendialog1.files[0] ' ' opendialog1.files[1];

of course, u must check the length of stringlist first to prevent invalid access.

P.S. if u wanna get the file name only, u can use the function ExtractFileName(value : string) : string

anything else, just feel free to ask

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