2009-04-24 45 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);