Example #1
0
 protected override bool ClosesDropDownAt(Point p)
 {
     if (Style == RibbonButtonStyle.DropDown)
     {
         return(false);
     }
     if (Style == RibbonButtonStyle.SplitDropDown)
     {
         return(ButtonFaceBounds.Contains(p));
     }
     return(true);
 }
Example #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);
        }
Example #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);
        }