/// <summary></summary> protected override void OnMouseMove(MouseEventArgs e) { m_hoveringButton = null; m_dropDownHovering = false; if (m_isResizing) { if (e.Y < -InternalButtonHeight) { if (m_canGrow) { Height += InternalButtonHeight; } } else if (e.Y > InternalButtonHeight) { if (m_canShrink) { Height -= InternalButtonHeight; } } return; } if (GripRectangle.Contains(e.X, e.Y)) { Cursor = Cursors.SizeNS; return; } if (DropDownRectangle.Contains(e.X, e.Y)) { Cursor = Cursors.Hand; m_dropDownHovering = true; Invalidate(); //adjust Tooltip... if ((m_toolTip.Tag != null)) { if (!m_toolTip.Tag.Equals("Configure")) { m_toolTip.Active = true; m_toolTip.SetToolTip(this, SilSidePane.ConfigureButtons); m_toolTip.Tag = "Configure"; } } else { m_toolTip.Active = true; m_toolTip.SetToolTip(this, SilSidePane.ConfigureButtons); m_toolTip.Tag = "Configure"; } } else if ((Buttons.GetItem(e.X, e.Y) != null)) { Cursor = Cursors.Hand; m_hoveringButton = Buttons.GetItem(e.X, e.Y); Invalidate(); //adjust tooltip... if (!m_hoveringButton.isLarge) { if (m_toolTip.Tag == null) { m_toolTip.Active = true; m_toolTip.SetToolTip(this, m_hoveringButton.Text); m_toolTip.Tag = m_hoveringButton; } else { if (!m_toolTip.Tag.Equals(m_hoveringButton)) { m_toolTip.Active = true; m_toolTip.SetToolTip(this, m_hoveringButton.Text); m_toolTip.Tag = m_hoveringButton; } } } else { m_toolTip.Active = false; } } else { Cursor = Cursors.Default; } }
/// <summary></summary> protected override void OnMouseDown(MouseEventArgs e) { m_isResizing = GripRectangle.Contains(e.X, e.Y); }