Hover over column headers

Posted by: himaheshh on 8 September 2017, 1:56 pm EST

  • Posted 8 September 2017, 1:56 pm EST

    Hi,


    I am using the spread for windows. Is it possible to display a custom text when hover over the column header? The custom text should not be displayed when the mouse floats around the rows.


    If it is possible, please also advice any impact to the performance.


     Regards


    Mahesh

  • Replied 8 September 2017, 1:56 pm EST

    Hello,


    In order to display text while Hovering over the column header, set TextTipPolicy property as FarPoint.Win.Spread.TextTipPolicy.Floating and write the code to display text in TextTipFetch Event for Column Header postion.Below is the code that might help you to understand it better,


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


    FpSpread1.TextTipPolicy = FarPoint.Win.Spread.TextTipPolicy.Floating


    End Sub


    Private Sub FpSpread1_TextTipFetch(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.TextTipFetchEventArgs) Handles FpSpread1.TextTipFetch


    If e.ColumnHeader = True Then


    MsgBox("hello")


    End If


    End Sub


     


     


     


    Regards,

  • Replied 8 September 2017, 1:56 pm EST

    Hi,


     Thank you.


    But the code below, doesnt show the text unless the column width is less than the length of the column header text.


     


    private void fpSpread1_TextTipFetch(object sender, TextTipFetchEventArgs e)


    {


    if (e.ColumnHeader)


    {


    e.TipText = "It is a Measure";


    }


    }


    Please correct me if I am doing something wrong.


    Thank you


     

  • Replied 8 September 2017, 1:56 pm EST

    Hello Mahesh,


    In order to show Text Tip , you need to turn e.ShowTip = True . So the code should look like this,


    private void fpSpread1_TextTipFetch(object sender, TextTipFetchEventArgs e)


    {


    if (e.ColumnHeader)


    {


    e.ShowTip = True 


    e.TipText = "It is a Measure";


    }


    }


    I hope it will help you.


     


    Regards,


     

Need extra support?

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

Learn More

Forum Channels