我有一個TGroupBox幾個組件裏面,我試圖將所有這些都是分組框裏面這樣爲什麼我的TGroupBox的ComponentCount屬性返回0?
for i := 0 to GroupBox1.ComponentCount -1 do
if (GroupBox1.Components[i]) is TWinControl then
TWinControl(GroupBox1.Components[i]).Enabled:=False;
組件的Enabled
財產,但ComponentCount總是返回0,有什麼我」失蹤了?
要在此進一步闡述,被放置在設計時組件** **擁有由父'TForm'在運行時,這就是爲什麼他們不會出現在的了'Components'列表'TGroupBox'。它們位於'TForm'的'Components'列表中。 – 2012-03-29 01:42:05