ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGroupCustomControl.GetGroupKeyTips C# (CSharp) Method

GetGroupKeyTips() public method

Gets the array of group level key tips.
public GetGroupKeyTips ( KeyTipInfoList keyTipList, int lineHint ) : void
keyTipList KeyTipInfoList List to add new entries into.
lineHint int Provide hint to item about its location.
return void
        public void GetGroupKeyTips(KeyTipInfoList keyTipList, int lineHint)
        {
            // Only provide a key tip if we are visible and the target control can accept focus
            if (Visible && (LastCustomControl != null) && LastCustomControl.CanFocus)
            {
                // Get the screen location of the button
                Rectangle viewRect = _ribbon.KeyTipToScreen(this);

                // Determine the screen position of the key tip
                Point screenPt = Point.Empty;

                // Determine the screen position of the key tip dependant on item location/size
                switch (_currentSize)
                {
                    case GroupItemSize.Large:
                        screenPt = new Point(viewRect.Left + (viewRect.Width / 2), viewRect.Bottom);
                        break;
                    case GroupItemSize.Medium:
                    case GroupItemSize.Small:
                        screenPt = _ribbon.CalculatedValues.KeyTipRectToPoint(viewRect, lineHint);
                        break;
                }

                keyTipList.Add(new KeyTipInfo(_ribbonCustomControl.Enabled,
                                              _ribbonCustomControl.KeyTip,
                                              screenPt,
                                              ClientRectangle,
                                              _controller));
            }
        }