Ejemplo n.º 1
0
 protected override bool ClosesDropDownAt(Point p)
 {
     if (Style == RibbonButtonStyle.DropDown)
     {
         return(false);
     }
     if (Style == RibbonButtonStyle.SplitDropDown)
     {
         return(ButtonFaceBounds.Contains(p));
     }
     return(true);
 }
Ejemplo n.º 2
0
        public override void OnClick(EventArgs e)
        {
            if (Style != RibbonButtonStyle.Normal && !ButtonFaceBounds.Contains(_lastMousePos))
            {
                //Clicked the dropdown area, don't raise Click()
                return;
            }

            if (CheckOnClick)
            {
                Checked = !Checked;
            }

            base.OnClick(e);
        }
Ejemplo n.º 3
0
        public override void OnClick(EventArgs e)
        {
            //Console.WriteLine("Hello World!kkkkk1   " +  this.ParentItem.ToString());
            //Console.WriteLine("Hello World!kkkkk   " + this.ParentItem.Text + "  ddd  " + this.Text);
            if (this.Text != null && this.ParentItem != null)
            {
                //    ((RibbonComboBox)this.ParentItem).TextBoxText = this.Text;//½«boxµÄÄÚÈÝÌîÉÏtext
            }
            if (Style != RibbonButtonStyle.Normal && !ButtonFaceBounds.Contains(_lastMousePos))
            {
                //Clicked the dropdown area, don't raise Click()
                return;
            }

            if (CheckOnClick)
            {
                Checked = !Checked;
            }

            base.OnClick(e);
        }