protected override void OnKeyUp(KeyEventArgs e) { if (e.KeyData == Keys.Enter || e.KeyData == Keys.Space) { if (!this.IsArrowButton) { e.Handled = true; isSelected = true; this.PaintingType = PaintType.Selected; NavigateBarButton.PerformClick(); } } else { base.OnKeyUp(e); } }
protected override void OnMouseClick(MouseEventArgs e) { base.OnMouseClick(e); toolTip.RemoveAll(); // Only left click if (e.Button == MouseButtons.Left && !this.IsArrowButton) // Sadece sol click ile button seçilebilmeli { this.IsSelected = true; this.PaintingType = PaintType.Selected; NavigateBarButton.PerformClick(); } else { if (!this.IsArrowButton) { Point p = this.PointToScreen(new Point(this.Location.X - this.Left + this.Width, this.Location.Y)); NavigateBarButton.ButtonMenu.Show(p); } } }