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));
}
}