/// <summary> /// Shows the DropDown /// </summary> public void ShowDropDown() { OnDropDownShowing(EventArgs.Empty); AssignHandlers(); RibbonDropDown dd = new RibbonDropDown(this, DropDownItems, Owner); dd.ShowSizingGrip = DropDownResizable; dd.Closed += new EventHandler(DropDown_Closed); dd.Show(Owner.PointToScreen(new Point(TextBoxBounds.Left, Bounds.Bottom))); }
/// <summary> /// Shows the DropDown /// </summary> public void ShowDropDown() { OnDropDownShowing(EventArgs.Empty); AssignHandlers(); if (_dropdown == null || _dropdown.IsDisposed) { _dropdown = new RibbonDropDown(this, DropDownItems, Owner); _dropdown.ShowSizingGrip = DropDownResizable; _dropdown.Closed += new EventHandler(DropDown_Closed); } _dropdown.Show(Owner.PointToScreen(new Point(TextBoxBounds.Left, Bounds.Bottom))); _dropDownVisible = true; }
/// <summary> /// Shows the DropDown /// </summary> public virtual void ShowDropDown() { if (!_DropDownVisible) { AssignHandlers(); OnDropDownShowing(EventArgs.Empty); RibbonDropDown dd = new RibbonDropDown(this, DropDownItems, Owner); dd.DropDownMaxHeight = _dropDownMaxHeight; dd.ShowSizingGrip = DropDownResizable; dd.DrawIconsBar = _iconsBar; dd.Closed += new EventHandler(DropDown_Closed); Point location = OnGetDropDownMenuLocation(); dd.Show(location); _DropDownVisible = true; } }
/// <summary> /// Shows the drop down items of the button, as if the dropdown part has been clicked /// </summary> public void ShowDropDown() { if (DropDownItems.Count == 0) { SetPressed(false); return; } IgnoreDeactivation(); _dropDown = new RibbonDropDown(this, DropDownItems, Owner); //_dropDown.FormClosed += new FormClosedEventHandler(dropDown_FormClosed); //_dropDown.StartPosition = FormStartPosition.Manual; _dropDown.ShowSizingGrip = true; Point location = Canvas.PointToScreen(new Point(Bounds.Left, Bounds.Top)); SetDropDownVisible(true); _dropDown.Show(location); }
/// <summary> /// Shows the drop down items of the button, as if the dropdown part has been clicked /// </summary> public void ShowDropDown() { if (Style == RibbonButtonStyle.Normal || DropDownItems.Count == 0) { CloseDropDown(); return; } if (Style == RibbonButtonStyle.DropDown) { SetPressed(true); } else { _dropDownPressed = true; } OnDropDownShowing(EventArgs.Empty); _dropDown = new RibbonDropDown(this, DropDownItems, Owner); _dropDown.Closed += new EventHandler(_dropDown_Closed); _dropDown.ShowSizingGrip = DropDownResizable; RibbonDropDown canvasdd = Canvas as RibbonDropDown; Point location = Point.Empty; if (canvasdd != null) { location = Canvas.PointToScreen(new Point(Bounds.Right, Bounds.Top)); _dropDown.PreviousDropDown = Canvas as RibbonDropDown; canvasdd.NextDropDown = _dropDown; } else { location = Canvas.PointToScreen(new Point(Bounds.Left, Bounds.Bottom)); } SetDropDownVisible(true); _dropDown.SelectionService = GetService(typeof(ISelectionService)) as ISelectionService; _dropDown.Show(location); }
/// <summary> /// Shows the DropDown /// </summary> public virtual void ShowDropDown() { if (!_DropDownVisible) { //foreach (RibbonItem item in DropDownItems) //{ // if (item == _selectedItem) // item.Checked = true; // else // item.Checked = false; //} OnDropDownShowing(EventArgs.Empty); AssignHandlers(); RibbonDropDown dd = new RibbonDropDown(this, DropDownItems, Owner); dd.ShowSizingGrip = DropDownResizable; dd.DrawIconsBar = _iconsBar; dd.Closed += new EventHandler(DropDown_Closed); dd.Show(Owner.PointToScreen(new Point(TextBoxBounds.Left, Bounds.Bottom))); _DropDownVisible = true; } }