public RibbonButtonList() { _buttons = new RibbonButtonCollection(this); _dropDownItems = new RibbonItemCollection(); _controlButtonsWidth = 16; _itemsInLargeMode = 7; _itemsInMediumMode = 3; _ItemsInDropwDownMode = new Size(7, 5); _buttonsSizeMode = RibbonElementSizeMode.Large; _scrollType = ListScrollType.UpDownButtons; }
public override void OnCanvasChanged(EventArgs e) { base.OnCanvasChanged(e); if (Canvas is RibbonDropDown) { _scrollType = ListScrollType.Scrollbar; } else { _scrollType = ListScrollType.UpDownButtons; } }
private void SetScrollDirection(ListScrollType scrollType) { switch (scrollType) { case ListScrollType.Horizontal: horizontal = true; vertical = false; m_StartAxis = GridLayoutGroup.Axis.Vertical; break; case ListScrollType.Vertical: horizontal = false; vertical = true; m_StartAxis = GridLayoutGroup.Axis.Horizontal; break; default: break; } SetDirty(); }