Example #1
0
        public override bool OnMouseDown(RGCellMouseEventArgs e)
        {
            UpdateValueByCursorX(e.CellPosition, e.CursorPosition.X);

            // return true to notify control that the mouse-down operation has been hanlded.
            // all operations after this will be aborted.
            return true;
        }
Example #2
0
        public override bool OnMouseMove(RGCellMouseEventArgs e)
        {
            // requires the left button
            if (e.Buttons == System.Windows.Forms.MouseButtons.Left)
            {
                UpdateValueByCursorX(e.CellPosition, e.CursorPosition.X);
            }

            return false;
        }
Example #3
0
        private void Grid_CellMouseLeave(object sender, RGCellMouseEventArgs e)
        {
            if (chkLeave.Checked) Log("cell mouse leave: " + e.CellPosition);

            if (chkHoverHighlight.Checked)
            {
                grid.RemoveRangeBorder(new ReoGridRange(e.CellPosition, e.CellPosition), ReoGridBorderPos.Outline);
            }

            if (chkBackground.Checked)
            {
                grid.RemoveRangeStyle(new ReoGridRange(e.CellPosition, e.CellPosition), PlainStyleFlag.FillColor);
            }
        }
Example #4
0
        private void Grid_CellMouseEnter(object sender, RGCellMouseEventArgs e)
        {
            if(chkEnter.Checked) Log("cell mouse enter: " + e.CellPosition);

            if (chkHoverHighlight.Checked)
            {
                grid.SetRangeBorder(new ReoGridRange(e.CellPosition, e.CellPosition), ReoGridBorderPos.Outline,
                    ReoGridBorderStyle.SolidGray);
            }

            if (chkBackground.Checked)
            {
                grid.SetRangeStyle(new ReoGridRange(e.CellPosition, e.CellPosition), new ReoGridRangeStyle
                {
                    Flag = PlainStyleFlag.FillColor,
                    BackColor = Color.Silver,
                });
            }
        }
Example #5
0
 private void Grid_CellMouseMove(object sender, RGCellMouseEventArgs e)
 {
     Log("cell mouse move: " + e.CellPosition + ", " + e.CursorPosition);
 }
Example #6
0
        public override bool OnMouseUp(RGCellMouseEventArgs e)
        {
            if (IsPressed)
            {
                if (Bounds.Contains(e.CursorPosition))
                {
                    PerformClick();
                }
            }

            IsPressed = false;

            e.Cell.RenderColor = e.Cell.Style.TextColor;

            return true;
        }
Example #7
0
        public override bool OnMouseLeave(RGCellMouseEventArgs e)
        {
            // restore last cursor
            e.Grid.CellsSelectionCursor = backupCursor;

            return false;
        }
Example #8
0
        public override bool OnMouseEnter(RGCellMouseEventArgs e)
        {
            // save current cursor
            backupCursor = e.Grid.CellsSelectionCursor;

            // set cursor to hand
            e.Grid.CellsSelectionCursor = Cursors.Hand;

            return false;
        }
Example #9
0
        public override bool OnMouseDown(RGCellMouseEventArgs e)
        {
            IsPressed = true;

            e.Cell.RenderColor = Color.Red;

            return true;
        }
Example #10
0
        public override bool OnMouseDown(RGCellMouseEventArgs e)
        {
            if (IsDropdown)
            {
                PullUp();
            }
            else
            {
                PushDown();
            }

            return true;
        }
Example #11
0
        public override bool OnMouseUp(RGCellMouseEventArgs e)
        {
            ButtonState &= ~System.Windows.Forms.ButtonState.Pushed;

            if (CheckRect.Contains(e.CursorPosition))
            {
                ToggleCheckStatus();

                if (Click != null)
                {
                    Click(this, null);
                }
            }

            return true;
        }
Example #12
0
 public override bool OnMouseDown(RGCellMouseEventArgs e)
 {
     if (CheckRect.Contains(e.CursorPosition))
     {
         ButtonState |= System.Windows.Forms.ButtonState.Pushed;
         return true;
     }
     else
         return false;
 }
Example #13
0
        public override bool OnMouseUp(RGCellMouseEventArgs e)
        {
            if (IsPressed)
            {
                if (Bounds.Contains(e.CursorPosition)
                    && Click != null)
                {
                    Click(this, null);
                }

                IsPressed = false;
                return true;
            }
            else
                return false;
        }
Example #14
0
 public override bool OnMouseDown(RGCellMouseEventArgs e)
 {
     IsPressed = true;
     return true;
 }
Example #15
0
 public override bool OnMouseLeave(RGCellMouseEventArgs e)
 {
     IsHover = false;
     return true;
 }
Example #16
0
 public override bool OnMouseEnter(RGCellMouseEventArgs e)
 {
     IsHover = true;
     return true;
 }