Example #1
0
 void gridGroupingControl1_TableControlCellMouseHoverLeave(object sender, GridTableControlCellMouseEventArgs e)
 {
     if (this.toolTip != null && this.toolTip.Active)
     {
         this.toolTip.Active = false;
     }
 }
Example #2
0
        void gridGroupingControl1_TableControlCellMouseHover(object sender, GridTableControlCellMouseEventArgs e)
        {
            GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex);
            Element el = e.TableControl.PointToNestedDisplayElement(e.Inner.MouseEventArgs.Location);

            if (el != null && el.Kind == DisplayElementKind.FilterBar)
            {
                int            row = el.ParentTable.Elements.IndexOf(el);
                GridCellLayout cellLayout;

                cellLayout = e.TableControl.GetCellRenderer(row, e.Inner.ColIndex).GetCellLayout(row, e.Inner.ColIndex, style);

                Rectangle rect = new Rectangle(e.Inner.MouseEventArgs.Location, new Size(1, 1));

                rect.X += 1;
                rect.Y -= 1;

                if (cellLayout.Buttons.Length > 1)
                {
                    if (cellLayout.Buttons[0].IntersectsWith(rect))
                    {
                        toolTip.SetToolTip(e.TableControl, "The collection of unique items which are available in this column.");
                        toolTip.Active = true;
                    }
                    else if (cellLayout.Buttons[1].IntersectsWith(rect))
                    {
                        toolTip.SetToolTip(e.TableControl, "The collection of compare operators to filter the column.");
                        toolTip.Active = true;
                    }
                }
            }
        }
Example #3
0
        private void gridGroupingControl1_TableControlCellMouseHover(object sender, GridTableControlCellMouseEventArgs e)
        {
            GridTableCellStyleInfo         style = (GridTableCellStyleInfo)e.TableControl.Model[e.Inner.RowIndex, e.Inner.ColIndex];
            GridTableCellStyleInfoIdentity id    = style.TableCellIdentity;

            //
            // Note the check for not being a GridTableCellType.NestedTableCell below. If the mouse hovers
            // over an area of a nested table, this event will get hit twice: First for the outer
            // TableControl (which routes the event to the inner TableControl) and then afterward
            // for the inner TableControl. For the outer TableControl the TableCellType
            // is GridTableCellType.NestedTableCell
            //
            if (id.TableCellType != GridTableCellType.NestedTableCell)
            {
                string column = (id.Column != null) ? id.Column.ToString() : "";
                Console.WriteLine("MouseHover over " + id.TableCellType.ToString() + "(" + column + ", " + id.DisplayElement.GetType().Name + ")");
            }
        }