User Tools

Site Tools


Sidebar

<< Back


koda:en:documentation:container_control

Container Controls

Two controls are Container Controls: Group, and ControlGroup (Strictly speaking, Form is also a container.) A control that is contained by a container control (e.g. a Group control) will have the container control as its parent.

Contained by as used here needs to be defined. A control that is contained by a container control appears in the Object Tree as a child of the container control. Consider:

Here Checkbox1 is contained by Group1. But Radio1 is not.

Checkbox1 was created by visually placing it within the visual bounds of Group1. Radio1 was created outside the bounds and then dragged and dropped where it is now.

Because Checkbox1 was created within Group1, if you select Group1 and move it, Checkbox1 moves with the group – but Radio1 stays where it is.

How can I get Radio1 to move with Group1?

  1. Select Radio1
  2. Cut it
  3. Select Group1, either in the Object Treeview or by clicking on an edge of it in the Design Area
  4. Place the cursor visually within Group1
  5. Press Ctrl+V to paste it

In summary

  • Controls that, in Object Treeview, are children of a container control move with the container control.
  • Deleting (copying, cutting) a container control deletes (copies, cuts) the container control and all controls contained by it.
  • A control may be visually within the bounds of a container control but not be contained by it.
  • To make a control created visually outside a container control part of the container control, cut the control and paste it into the container.
  • The Left and Top properties of controls contained by a container control are relative to the container.

Caveats

  • You cannot drag and drop a control to change whether it is contained by the form or by a container control
  • If you cut and paste a control to have it contained by a container control and it is too large to fit in the container control, it will not be displayed in the Design Area.
koda/en/documentation/container_control.txt · Last modified: 2014/07/10 10:47 (external edit)