private void SetColumnLayout(TColumnLayout AValue) { if (FColumnLayout == AValue) { return; } FColumnLayout = AValue; if (FColumnLayout == TColumnLayout.clHorizontalThenVertical) { ChildSizing.PanelLayout = PanelLayout.cclLeftToRightThenTopToBottom; } else { ChildSizing.PanelLayout = PanelLayout.cclTopToBottomThenLeftToRight; } UpdateControlsPerLine(); }
public TRadioGroup() { SetStyle(ControlStyles.UserMouse | ControlStyles.StandardClick | ControlStyles.StandardDoubleClick, true); ChildSizing = new ChildSizingPanel(); FItems = new TRadioGroupStringList(this); FAutoFill = true; FItemIndex = -1; FLastClickedItemIndex = -1; FButtonList = new List <RadioButton>(); FColumns = 1; FColumnLayout = TColumnLayout.clHorizontalThenVertical; ChildSizing.PanelLayout = PanelLayout.cclLeftToRightThenTopToBottom; ChildSizing.ControlsPerLine = FColumns; //ChildSizing.ShrinkHorizontal = crsScaleChilds; //ChildSizing.ShrinkVertical = crsScaleChilds; //ChildSizing.EnlargeHorizontal = crsHomogenousChildResize; //ChildSizing.EnlargeVertical = crsHomogenousChildResize; ChildSizing.LeftRightSpacing = 6; ChildSizing.TopBottomSpacing = 0; this.Controls.Add(this.ChildSizing); }