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

如何顯示縮圖

答題得分者是:william
help
一般會員


發表:12
回覆:54
積分:13
註冊:2002-06-14

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-01-14 13:49:13 IP:61.61.xxx.xxx 未訂閱
請問, 用listview加上imagelist時,可以顯示icon, 但是如果要像檔案總管一樣可以顯示縮圖, 要怎麼做呢? 用listview時, 若圖大大, 則vsIcon模式只會顯示圖之一角. 謝謝大家 gogowin
------
gogowin
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-01-14 14:38:03 IP:147.8.xxx.xxx 未訂閱
A simple way is making use if the SmallImages property of the ListView and assign an ImageList containing the resized images. Otherwise, you may need to write up you own OnDrawItem/OnDrawSubItem events (or OnCustomDrawItem/OnCustomDrawSubItem...etc).
help
一般會員


發表:12
回覆:54
積分:13
註冊:2002-06-14

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-01-14 15:05:26 IP:61.61.xxx.xxx 未訂閱
問題重點是如何resize呢? 
------
gogowin
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-01-14 15:10:47 IP:147.8.xxx.xxx 未訂閱
引言:問題重點是如何resize呢? >< face="Verdana, Arial, Helvetica"> When adding image to image list at design time. You have options "Crop", "Stretch" and "Center" if the image's size is larger than the size defined for the image list, select "Stretch".
help
一般會員


發表:12
回覆:54
積分:13
註冊:2002-06-14

發送簡訊給我
#5 引用回覆 回覆 發表時間:2003-01-14 15:23:34 IP:61.61.xxx.xxx 未訂閱
Unfortunately, I need to add images from directory at run time....
------
gogowin
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#6 引用回覆 回覆 發表時間:2003-01-14 15:36:27 IP:147.8.xxx.xxx 未訂閱
引言: Unfortunately, I need to add images from directory at run time.... >< face="Verdana, Arial, Helvetica"> Are you working on some kind of image viewer? Then I would recommend writing you own OnCustomDrawItem/OnCustomDrawSubItem for the list view in order to save resources needed to create and store the resized images.
banson1716
高階會員


發表:55
回覆:182
積分:167
註冊:2002-04-14

發送簡訊給我
#7 引用回覆 回覆 發表時間:2003-01-14 16:00:34 IP:61.223.xxx.xxx 未訂閱
Delphi 本身就 imagview 範例可供參考
help
一般會員


發表:12
回覆:54
積分:13
註冊:2002-06-14

發送簡訊給我
#8 引用回覆 回覆 發表時間:2003-01-14 19:12:06 IP:61.61.xxx.xxx 未訂閱
謝謝William. 我已得到方向, 並解決了問題. 我不是做image viewer. 而是做一個影像處理軟體, 要計算或衡量尺寸並計算各類面積或角度等數值...    我用Tbitmap.canvas.stretchdraw() 來將圖形重新繪製後再放入imagelist裏就沒問題了.  太好了!多謝. 也謝謝
------
gogowin
系統時間:2024-04-29 13:06:13
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!