DSizerProperties

From Dabo Wiki
Jump to: navigation, search
Property Frequency Used Type Description
Orientation Always string Default is Horizontal. You can pass just v or h, in upper or lower case.
Visible Occasionally bool Controls the visibility of all the items controlled by this sizer. In other words, setting Visible = False hides all of the items controlled by this sizer.
Children Rarely list of SizerItem objects Returns a list of all SizerItem objects for this sizer. Can be useful in some instances, but generally, ChildWindows is what you'll need.
ChildWindows Frequently list of controls Returns a list of all controls directly managed by this sizer. Ignores spacers and nested sizers.
ControllingSizer Sometimes dSizer or dGridSizer Returns a reference to the sizer that manages this sizer, or None if it is not nested inside another sizer.
ControllingSizerItem Sometimes SizerItem Returns a reference to the SizerItem the controls the layout of this sizer, or None if it is not nested inside another sizer.
Parent Rarely some UI control Returns a reference to the control that this sizer is contained in. In the case of nested sizers, it traverses the nesting to find the ultimate UI control this sizer is contained within.
Border Sometimes int Default=0. Sets a default value for the border that will be applied to any controls added to the sizer afterwards. Note that it does not affect the border of items already added to the control. This property is useful when you want to add a series of items to a sizer with the same border: just set this property once, and then add your items.
BorderRight Sometimes bool Default=True. Affects whether the Border property is applied to the Right side of controls added to the sizer.
BorderLeft Sometimes bool Default=True. Affects whether the Border property is applied to the Left side of controls added to the sizer.
BorderTop Sometimes bool Default=True. Affects whether the Border property is applied to the Top side of controls added to the sizer.
BorderBottom Sometimes bool Default=True. Affects whether the Border property is applied to the Bottom side of controls added to the sizer.
Spacing Sometimes int Default=0. Sets a default value for the spacing that will be added before any controls added to the sizer afterwards. Note that it does not affect the spacing of items already added to the control. This property is useful when you want to add a series of items to a sizer with the same spacing between them: just set this property once, and then add your items.
Height Rarely int Read-Only. Returns the height in pixels of the area controlled by the sizer.
Width Rarely int Read-Only. Returns the width in pixels of the area controlled by the sizer.