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

Free 物件

尚未結案
jumo
一般會員


發表:33
回覆:65
積分:24
註冊:2002-04-17

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-04-23 11:45:36 IP:61.221.xxx.xxx 未訂閱
我在一個 Form 上面會動態 Create N個 TPanel, 每個 Panel 會動態 Create N個 TEdit, TLabel... 等等, 目前我釋放物件是用ComponentCount一個一個檢查, 但是因為物件太多, 速度不理想. 請問各位大大, 有什麼比較快速的方式可以達到相同的功能, 謝謝!!
william
版主


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

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-04-23 11:57:12 IP:147.8.xxx.xxx 未訂閱
Create all controls using the panel as the owner. Freeing of the panel will destroy all components it owned. BTW, if all the components are owned by the form, they will get freed upon destruction of the form. If you want to destroy the components yourself, you can store them in a TList for quick reference. 
系統時間:2024-04-29 19:42:42
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!