示例#1
0
 protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
 {
     base.OnMouseDown(e);
     base.set_Capture(true);
     this.CapturingMouse = true;
     this.btnState = System.Windows.Forms.VisualStyles.ComboBoxState.Pressed;
     base.Invalidate();
 }
示例#2
0
 protected override void OnMouseUp(System.Windows.Forms.MouseEventArgs e)
 {
     base.OnMouseUp(e);
     this.btnState = System.Windows.Forms.VisualStyles.ComboBoxState.Normal;
     base.Invalidate();
     this.CapturingMouse = false;
     base.set_Capture(false);
     base.Invalidate();
 }
示例#3
0
 protected override void OnMouseLeave(System.EventArgs e)
 {
     base.OnMouseLeave(e);
     if (!this.CapturingMouse)
     {
         this.btnState = System.Windows.Forms.VisualStyles.ComboBoxState.Normal;
         base.Invalidate();
     }
 }
示例#4
0
 protected override void OnLostFocus(System.EventArgs e)
 {
     base.OnLostFocus(e);
     if (base.get_Enabled())
     {
         this.btnState = System.Windows.Forms.VisualStyles.ComboBoxState.Normal;
     }
     base.Invalidate();
 }
示例#5
0
 protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
 {
     base.OnMouseMove(e);
     if (this.CapturingMouse)
     {
         System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(0, 0, base.get_Width(), base.get_Height());
         this.btnState = System.Windows.Forms.VisualStyles.ComboBoxState.Normal;
         if (((e.get_X() >= rectangle.get_Left()) && (e.get_X() <= rectangle.get_Right())) && ((e.get_Y() >= rectangle.get_Top()) && (e.get_Y() <= rectangle.get_Bottom())))
         {
             this.btnState = System.Windows.Forms.VisualStyles.ComboBoxState.Pressed;
         }
         base.set_Capture(true);
         base.Invalidate();
     }
     else if (!this.get_Focused() && (this.btnState != System.Windows.Forms.VisualStyles.ComboBoxState.Hot))
     {
         this.btnState = System.Windows.Forms.VisualStyles.ComboBoxState.Hot;
         base.Invalidate();
     }
 }
示例#6
0
 protected override void OnEnabledChanged(System.EventArgs e)
 {
     base.OnEnabledChanged(e);
     this.btnState = base.get_Enabled() ? System.Windows.Forms.VisualStyles.ComboBoxState.Normal : System.Windows.Forms.VisualStyles.ComboBoxState.Disabled;
     base.Invalidate();
 }