Create tooltip for cells with different text on each cell

Posted by: XOtano on 24 June 2018, 7:03 pm EST

    • Post Options:
    • Link

    Posted 24 June 2018, 7:03 pm EST

    Hi there,

    I want to display the data in multiple rows.

    When the user put the mouse over a cell i want a custom text for each cell in the spread.

    Is that possible?

    How?

    Many thanks

  • Posted 26 June 2018, 10:04 pm EST

    Hello,

    If you want to show the custom text( your own data, not the default data in the cell) as a text tip on hovering cells on the Spread, then you need to set the TipText property in the TextTipFetch event of Spread as given below:-

            private void Form1_Load(object sender, EventArgs e)
            {
                fpSpread1.ActiveSheet.SetValue(0, 0, "Cell[0,0]");
                fpSpread1.ActiveSheet.SetValue(0, 1, "Cell[0,1]");
                fpSpread1.ActiveSheet.SetValue(0, 2, "Cell[0,2]");
                fpSpread1.TextTipPolicy = FarPoint.Win.Spread.TextTipPolicy.Floating;
                fpSpread1.TextTipDelay = 1000;
                fpSpread1.TextTipFetch += fpSpread1_TextTipFetch;
            }
            void fpSpread1_TextTipFetch(object sender, FarPoint.Win.Spread.TextTipFetchEventArgs e)
            {
                if (e.Column == 0 && e.Row == 0)
                {
                    e.TipText = "New Text Tip on Cell[0,0] on hovering mouse";
                }
                if (e.Column == 1 && e.Row == 0)
                {
                    e.TipText = "New Text Tip on Cell[0,1] on hovering mouse";
                }
                e.ShowTip = true;
            }
    

    Hope it helps.

    Thanks,

    Reeva

Need extra support?

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

Learn More

Forum Channels