ToolTip for cell

Posted by: peroveg on 10 September 2017, 10:56 am EST

  • Posted 10 September 2017, 10:56 am EST

    Hello, is it possible to add tooltip for cell ?

    Thanks,

    RonAr

  • Replied 10 September 2017, 10:56 am EST

    RonAr,

    I don't think there is tool tip support for a cell in Spread for Silverlight/WPF .

     

    Thanks,

  • Replied 10 September 2017, 10:56 am EST

    Thanks for reply. If tooltip is not accessible, we can show standart PopUp, but we need to know position for cell on screen. Is it posible to get position for cell ?
  • Replied 10 September 2017, 10:57 am EST

    Hello,

    You can catch GcSpreadSheet's CellEnter event to know cell 's Row and Column coordinates only. It does not tell you the X and Y position for cell. You can get the position for the mouse in GcSpreadSheet's MouseMove event but it does not give you the cell coordinates.

    Thanks, 

  • Replied 10 September 2017, 10:57 am EST

    Here is a sample code to show tip for cell when mouse hover on it. Hope can help.

        public partial class MainPage : UserControl

        {

            ToolTip _tip = new ToolTip();

            

            public MainPage()

            {

                InitializeComponent();

                _tip.Placement = System.Windows.Controls.Primitives.PlacementMode.Mouse;

                _tip.HorizontalOffset = 10;

                _tip.VerticalOffset = 10;

            }


            private void gcSpreadSheet1_MouseMove(object sender, MouseEventArgs e)

            {

                var point = e.GetPosition(this.gcSpreadSheet1);

                var info = this.gcSpreadSheet1.HitTest(point.X, point.Y);

                _tip.IsOpen = false;

                if (info.HitTestType == GrapeCity.Windows.SpreadSheet.UI.HitTestType.Viewport && info.ViewportInfo != null)

                {

                    _tip.Content = string.Format("({0}, {1})", info.ViewportInfo.Row, info.ViewportInfo.Column);

                    _tip.IsOpen = true;

                }

            }

        } 

  • Replied 10 September 2017, 10:57 am EST

    Thanks.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels