2009-04-24 129 views

回答

5

對任何控件添加到父控件:

MyControl := TMyControl.Create(MyForm); // Form is the owner 
MyControl.Parent := ParentControl;  // Parent control is the parent 

你也能設置其他屬性,如果你喜歡。

4

與普通容器只有輕微的差別,您可以設置子控件的順序。

OldIndex:= FlowPanel.GetControlIndex(MyControl);  
FlowPanel.SetControlIndex(MyControl, OldIndex + 1);