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

FindComponent

答題得分者是:ccchen
cyl
中階會員


發表:163
回覆:171
積分:66
註冊:2002-07-11

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-02-09 23:04:31 IP:61.30.xxx.xxx 未訂閱
請問我在 PageControl1上放一各groupbox我寫了以下 (PageControl1.Pages[0].FindComponent('GroupBox1') as TGroupBox).Enabled:=false; 但是卻一值找不到,請問是否不能這樣寫?? 發表人 - cyl 於 2003/02/09 23:12:43
cmf
尊榮會員


發表:84
回覆:918
積分:1032
註冊:2002-06-26

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-02-09 23:31:29 IP:61.70.xxx.xxx 未訂閱
(form1.FindComponent('GroupBox1') as TGroupBox).Enabled:=false; 因為 GroupBox1.Parent = PageControl1.Pages[0] GroupBox1.OWNER = Form1 Indicates whether a given component is owned by the component. function FindComponent(const AName: string): TComponent; Description FindComponent returns the component in the Components property array with the name that matches the string in the AName parameter. Use FindComponent to determine whether a given component is owned by another. 發表人 - cmf 於 2003/02/21 09:40:44
------
︿︿
ccchen
版主


發表:61
回覆:940
積分:1394
註冊:2002-04-15

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-02-10 08:05:52 IP:61.219.xxx.xxx 未訂閱
FindComponent改成 FindChildControl就可以了 Components Array及Controls Array之差異可參考 http://delphi.ktop.com.tw/topic.php?TOPIC_ID=20036
系統時間:2024-05-13 17:45:48
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!