EventArgs used by the FocusColumnEnter
Inheritance: System.EventArgs
Beispiel #1
0
 /// <summary>
 /// Fired after a column receive the focus
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnFocusColumnEntered(ColumnEventArgs e)
 {
     if (FocusColumnEntered != null)
     {
         FocusColumnEntered(this, e);
     }
 }
        /// <summary>
        /// Select the picked column.
        /// </summary>
        /// <param name="ASender">sender</param>
        /// <param name="AEventArgs">event</param>
        protected void GrdColumns_FocusColumnEntered(System.Object ASender, ColumnEventArgs AEventArgs)
        {
            System.Int32 column;

            if (FDuringApplyOrCancel == true)
            {
                grdColumns.Selection.ResetSelection(false);
                return;
            }

            column = AEventArgs.Column;

            if ((column != -1) && (column != FSelectedColumn))
            {
                /* select the picked column */
                SelectColumn(column);
            }
        }
Beispiel #3
0
            public override void OnDoubleClick(SourceGrid.CellContext sender, EventArgs e)
            {
                base.OnDoubleClick(sender, e);

                SourceGrid.Position ClickPosition;
                SourceGrid.CellContextEventArgs CellArgs;
                SourceGrid.ColumnEventArgs HeaderCellArgs;

                // MessageBox.Show('TSgrdDataGrid.OnDoubleClick');

                ClickPosition = sender.Grid.PositionAtPoint(sender.Grid.PointToClient(MousePosition));

                if (ClickPosition != SourceGrid.Position.Empty)
                {
                    if ((sender.Grid.FixedRows == 1) && (ClickPosition.Row == 0))
                    {
                        // DoubleClick occured in a HeaderCell > fire OnDoubleClickHeaderCell Event
                        HeaderCellArgs = new SourceGrid.ColumnEventArgs(ClickPosition.Column);
                        ((TSgrdDataGrid)(sender.Grid)).OnDoubleClickHeaderCell(HeaderCellArgs);
                    }
                    else
                    {
                        Position ClickPosWithoutHeader = new Position(ClickPosition.Row, ClickPosition.Column);

                        if (sender.Grid.FixedRows == 1)
                        {
                            ClickPosWithoutHeader = new Position(ClickPosition.Row - 1, ClickPosition.Column);
                        }

                        // DoubleClick occured in a Cell > fire OnDoubleClickCell Event
                        CellArgs =
                            new SourceGrid.CellContextEventArgs(new CellContext(sender.Grid, ClickPosWithoutHeader));
                        ((TSgrdDataGrid)(sender.Grid)).OnDoubleClickCell(CellArgs);
                    }
                }
            }
Beispiel #4
0
 /// <summary>
 /// double click on the header cell
 /// </summary>
 /// <param name="e"></param>
 private void OnDoubleClickHeaderCell(ColumnEventArgs e)
 {
     // MessageBox.Show('OnDoubleClickHeaderCell.  Column: ' + e.Column.ToString);
     if (DoubleClickHeaderCell != null)
     {
         DoubleClickHeaderCell(this, e);
     }
 }