ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGroupGallery.KeyTipSelect C# (CSharp) Method

KeyTipSelect() public method

Perform action expected when a key tip is used to select the item.
public KeyTipSelect ( ) : void
return void
        public void KeyTipSelect()
        {
            if (_ribbonGallery.LastGallery != null)
            {
                _ribbonGallery.LastGallery.ShownGalleryDropDown(_ribbonGallery.LastGallery.RectangleToScreen(_ribbonGallery.LastGallery.ClientRectangle),
                                                                KryptonContextMenuPositionH.Left,
                                                                KryptonContextMenuPositionV.Top,
                                                                null,
                                                                _ribbonGallery.DropButtonItemWidth);
            }
        }

Usage Example

コード例 #1
0
        /// <summary>
        /// Perform actual selection of the item.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon instance.</param>
        public void KeyTipSelect(KryptonRibbon ribbon)
        {
            // Prevent the ribbon from killing keyboard mode when it loses the focus,
            // as this causes the tracking windows to be killed and we want them kept
            ribbon.LostFocusLosesKeyboard = false;

            // Get the target to show the drop down menu for the gallery
            _target.KeyTipSelect();

            // Exit the use of keyboard mode
            ribbon.KillKeyboardMode();
        }