Provides data for the HeaderMouseEnter, HeaderMouseLeave, HeaderMouseDown, HeaderMouseUp, HeaderMouseMove, HeaderClick and HeaderDoubleClick events of a Table
Inheritance: MouseEventArgs
Exemplo n.º 1
0
        /// <summary>
        /// Raises a MouseUp event for the Column header at the specified colunm 
        /// index position
        /// </summary>
        /// <param name="index">The index of the column to recieve the event</param>
        /// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
        protected void RaiseHeaderMouseUp(int index, MouseEventArgs e)
        {
            if (index < 0 || this.ColumnModel == null || index >= this.ColumnModel.Columns.Count)
            {
                return;
            }

            if (this.HeaderRenderer != null)
            {
                Column column = this.ColumnModel.Columns[index];

                HeaderMouseEventArgs mhea = new HeaderMouseEventArgs(column, this, index, this.DisplayRectToClient(this.ColumnModel.ColumnHeaderRect(index)), e);

                this.OnHeaderMouseUp(mhea);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Raises the HeaderMouseHover event
 /// </summary>
 /// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
 protected virtual void OnHeaderMouseHover(HeaderMouseEventArgs e)
 {
     if (this.CanRaiseEvents)
     {
         if (HeaderMouseHover != null)
         {
             HeaderMouseHover(e.Column, e);
         }
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Raises the HeaderMouseUp event
        /// </summary>
        /// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
        protected virtual void OnHeaderMouseUp(HeaderMouseEventArgs e)
        {
            if (this.CanRaiseEvents)
            {
                if (this.HeaderRenderer != null)
                {
                    this.HeaderRenderer.OnMouseUp(e);
                }

                if (HeaderMouseUp != null)
                {
                    HeaderMouseUp(e.Column, e);
                }
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Raises the HeaderDoubleClick event
        /// </summary>
        /// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
        protected virtual void OnHeaderDoubleClick(HeaderMouseEventArgs e)
        {
            if (this.CanRaiseEvents)
            {
                if (this.HeaderRenderer != null)
                {
                    this.HeaderRenderer.OnDoubleClick(e);
                }

                if (HeaderDoubleClick != null)
                {
                    HeaderDoubleClick(e.Column, e);
                }
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// Raises the DoubleClick event
 /// </summary>
 /// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
 public virtual void OnDoubleClick(HeaderMouseEventArgs e)
 {
     this.Bounds = e.HeaderRect;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Raises the MouseUp event
 /// </summary>
 /// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
 public virtual void OnMouseUp(HeaderMouseEventArgs e)
 {
     this.Bounds = e.HeaderRect;
 }
Exemplo n.º 7
0
        /// <summary>
        /// Raises the MouseEnter event
        /// </summary>
        /// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
        public virtual void OnMouseEnter(HeaderMouseEventArgs e)
        {
            this.Bounds = e.HeaderRect;

            bool tooltipActive = e.Table.ToolTip.Active;

            if (tooltipActive)
            {
                e.Table.ToolTip.Active = false;
            }

            e.Table.ResetMouseEventArgs();

            e.Table.ToolTip.SetToolTip(e.Table, e.Column.ToolTipText);

            if (tooltipActive)
            {
                e.Table.ToolTip.Active = true;
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// Raises the MouseDown event
        /// </summary>
        /// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
        public virtual void OnMouseDown(HeaderMouseEventArgs e)
        {
            if (!e.Table.Focused)
            {
                e.Table.Focus();
            }

            this.Bounds = e.HeaderRect;
        }