Spread Windows Forms 8.0 Product Documentation
Displaying Text Tips in a Cell

For cells that are too small to display all the text in the cell, you can allow the end user to see the contents in a text tip. You can set the policy and location for text tips for a cell or range of cells. Text tips can be displayed for data cells or header cells. When the pointer is over such a cell, the text tip displays.

Text Tip for Header

Text Tip Example

To display a text tip over a combo box cell, you would need to turn off something. By default, the combo box cell captures the mouse when moving over the cell, so it can go into edit mode on the first click and drop-down the list. You can either turn off this behavior, by setting the Editable property to True or you can create a custom cell type and override the IsReservedLocation method to return nothing for the parts of the cell that you want the text tip to show over and return an instance of the cell type in the parts of the cell for which you want the click to open the list.

For more information refer to the TextTipAppearance property, TextTipDelay property, and TextTipPolicy property.

Refer also to the TextTipFetchEventArgs class and the TextTipFetch event and OnTextTipFetch method.

For information on scroll bar tips, refer to the section on setting scroll bar tips in Customizing the Scroll Bars of the Component.

Using the Properties Window

  1. At design time, in the Properties window, select the Spread component.
  2. Select (in the Behavior group) the TextTipPolicy property.
  3. Click the drop-down arrow to display the choices and choose a value.
  4. If you want to set the delay, select the TextTipDelay property and type in a value.

Using Code

Set the TextTipPolicy property for the Spread component.

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.

C#
Copy Code
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);
VB
Copy Code
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)

Using the Spread Designer

  1. Select the Spread component (or select Spread from the pull-down menu).
  2. In the property list, in the Behavior category, select the TextTipPolicy property.
  3. Click the drop-down arrow to display the choices and choose a value.
  4. If you want to set the delay, select the TextTipDelay property and type in a value.
  5. From the File menu choose Apply and Exit to apply your changes to the component and exit Spread Designer.
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback