Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / FpSpread Class / TextTipPolicy Property
Example


In This Topic
    TextTipPolicy Property (FpSpread)
    In This Topic
    Gets or sets whether to display text tips and cell notes and the location of the tips and notes in this component.
    Syntax
    'Declaration
     
    Public Property TextTipPolicy As TextTipPolicy
    'Usage
     
    Dim instance As FpSpread
    Dim value As TextTipPolicy
     
    instance.TextTipPolicy = value
     
    value = instance.TextTipPolicy
    public TextTipPolicy TextTipPolicy {get; set;}

    Property Value

    TextTipPolicy setting that determines the display of the text tip
    Remarks

    This property lets you set the text tip policy, how and if the text tips are displayed when the pointer is over header cells or data cells that have text too long to appear in the cell. If the policy is set to display the text tips, a text tip is displayed in a ToolTip window for the cell under the pointer. This applies for cells in the data area as well as header cells. You can set whether to display the text tip anchored to the cell or to the pointer location. You can display it only when the Spread component has focus or regardless of focus. This also affects the display of cell notes when the cursor is over the cell note indicator.

    Text tips are not displayed automatically for headers and cells.

    The Spread component displays the text tip after the pointer is positioned over the cell a set amount of time (500 milliseconds by default). To change the delay, refer to the TextTipDelay property. The appearance of the default text tips is determined by your system settings and some other default settings. You can customize the appearance using the TextTipAppearance property.

    Here is what a text tip might look like floating next to a pointer:

    Example
    This example sets whether to display text tips, the location of the tips, and how long to wait before the text tip is shown.
    FarPoint.Win.Spread.FpSpread fpSpread1 = new FarPoint.Win.Spread.FpSpread();
    FarPoint.Win.Spread.SheetView shv = new FarPoint.Win.Spread.SheetView();
    fpSpread1.Location = new Point(10, 10);
    fpSpread1.Height = 200;
    fpSpread1.Width = 400;
    Controls.Add(fpSpread1);
    fpSpread1.Sheets.Add(shv);
    fpSpread1.ActiveSheet.SetValue(0, 0, "TestTextTip");
    fpSpread1.TextTipPolicy = FarPoint.Win.Spread.TextTipPolicy.Floating;
    fpSpread1.TextTipDelay = 1000;
    MessageBox.Show("Place the pointer over the text to see the text tip.", "", MessageBoxButtons.OK);
    
    Dim fpSpread1 As New FarPoint.Win.Spread.FpSpread()
    Dim shv As New FarPoint.Win.Spread.SheetView()
    fpSpread1.Location = New Point(10, 10)
    fpSpread1.Height = 200
    fpSpread1.Width = 400
    Controls.Add(fpSpread1)
    fpSpread1.Sheets.Add(shv)
    fpSpread1.ActiveSheet.SetValue(0, 0, "TestTextTip")
    fpSpread1.TextTipPolicy = FarPoint.Win.Spread.TextTipPolicy.Floating
    fpSpread1.TextTipDelay = 1000
    MessageBox.Show("Place the pointer over the text to see the text tip.", "", MessageBoxButtons.OK)
    See Also