示例#1
0
 ///<summary>Raises the CustomSuperTip event.</summary>
 ///<param name="e">A CustomToolTipEventArgs object that provides the event data.</param>
 void OnCustomSuperTip(CustomToolTipEventArgs e)
 {
     if (CustomSuperTip != null)
     {
         CustomSuperTip(this, e);
     }
 }
示例#2
0
        ///<summary>Gets the tooltip associated with a point in the control.</summary>
        protected override ToolTipControlInfo GetToolTipObjectInfoCore(GraphicsCache cache, Point p)
        {
            var baseInfo = base.GetToolTipObjectInfoCore(cache, p);

            if (baseInfo != null)
            {
                return(baseInfo);
            }
            var ht = GetHintObjectInfo() as GridHitInfo;

            if (ht == null)
            {
                return(null);
            }
            var args = new CustomToolTipEventArgs(ht);

            if (ht.InRowCell)
            {
                var column = ht.Column as SmartGridColumn;
                if (column != null && column.Controller != null)
                {
                    args.SuperTip = column.Controller.GetCellToolTip(GetRow(ht.RowHandle), GetRowCellValue(ht.RowHandle, column));
                }
            }

            OnCustomSuperTip(args);
            if (args.SuperTip != null)
            {
                return new ToolTipControlInfo()
                       {
                           SuperTip = args.SuperTip
                       }
            }
            ;
            return(null);
        }
 ///<summary>Raises the CustomSuperTip event.</summary>
 ///<param name="e">A CustomToolTipEventArgs object that provides the event data.</param>
 void OnCustomSuperTip(CustomToolTipEventArgs e)
 {
     if (CustomSuperTip != null)
         CustomSuperTip(this, e);
 }
        ///<summary>Gets the tooltip associated with a point in the control.</summary>
        protected override ToolTipControlInfo GetToolTipObjectInfoCore(GraphicsCache cache, Point p)
        {
            var baseInfo = base.GetToolTipObjectInfoCore(cache, p);
            if (baseInfo != null)
                return baseInfo;
            var ht = GetHintObjectInfo() as GridHitInfo;
            if (ht == null) return null;
            var args = new CustomToolTipEventArgs(ht);

            if (ht.InRowCell) {
                var column = ht.Column as SmartGridColumn;
                if (column != null && column.Controller != null)
                    args.SuperTip = column.Controller.GetCellToolTip(GetRow(ht.RowHandle), GetRowCellValue(ht.RowHandle, column));
            }

            OnCustomSuperTip(args);
            if (args.SuperTip != null)
                return new ToolTipControlInfo() { SuperTip = args.SuperTip };
            return null;
        }