Skybound Rebar

RebarButton.Child Property

Gets or sets the Control that acts as the child control of this button if it is a panel.

[Visual Basic]
Public Property Child As Control
[C#]
public System.Windows.Forms.Control Child {get; set;}

Property Value

A Control object that is the new child control of the button.

Remarks

Setting this property has no effect unless ButtonType is Panel.

When a child control is assigned to the button, the control's bounds are immediately set to the bounds of the button, and its Parent property is set to the Rebar that owns the button. If the button has not been assigned a band yet, the Parent property of the child control is set when it is assigned.

To add padding between the edges of the child control and the bounds of the button, use the ChildPadding property.

Exceptions

Exception Type Condition
InvalidOperationException

The specified value is of type Form.

-or-

The specified value is of type Rebar.

See Also

RebarButton Class | Skybound.Rebar Namespace