ComponentOne List 8.0 for ActiveX
FetchCellTips Event

 

True DBList Reference> TDBList Events> FetchCellTips Event

FetchCellTips Event

If the CellTips property is not set to 0 - None, the FetchCellTips event will be fired whenever the control has focus and the cursor is idle for a small amount of time (defined by the CellTipsDelay property) over a data cell, column header, column footer, split header, or control caption bar.

Syntax

object_FetchCellTips (ByVal SplitIndex As Integer, ByVal ColIndex As Integer, ByVal RowIndex As Long, CellTip As String, ByVal FullyDisplayed As Boolean, ByVal TipStyle As TrueDBList80.StyleDisp)

Arguments

SplitIndex is the zero-based index of the split the cursor is over.

ColIndex is an integer that identifies the column the cursor is over. This is either a zero-based column index or a (negative) CellTipConstants value.

RowIndex is an integer that identifies the row the cursor is over. This is either a zero-based row index or a (negative) CellTipConstants value.

CellTip contains the text to be displayed in the pop-up text box.

FullyDisplayed is a Boolean that is True if CellTip will fit entirely within the boundaries of the cell.

TipStyle is a Style object used to override the font and color characteristics of the cell tip text.

Remarks

Event applies to TDBList and TDBCombo controls.

This event will not fire if the cursor is over the scroll bars.

If the cursor is over a data cell, CellTip contains the contents of the cell as text. By default, the control will display up to 256 characters of the cell contents in a pop-up text box, enabling the user to peruse the contents of a cell even if it is not big enough to be displayed in its entirety. Instead of displaying the cell text, you can also modify CellTip to display your own message. However, if you set CellTip to Null or an empty string, the text box will not be displayed.

If the cursor is not over a control column, ColIndex will be negative and equal to one of the following CellTipConstants, depending upon the cursor position:

dblOnEmptyColumn

Cursor is over the blank area to the right of the last column

If the cursor is not over a data row, RowIndex will be negative and equal to one of the following CellTipConstants, depending upon the cursor position:

dblOnColumnHeader

Cursor is over a column header

dblOnSplitHeader

Cursor is over a split header

dblOnEmptyRow

Cursor is over the empty rows area (if EmptyRows is True) or the blank area (if EmptyRows is False)

dblOnCaption

Cursor is over the control caption

dblOnAddNew

Cursor is over the AddNew row

dblOnColumnFooter

Cursor is over a column footer

If the cursor is over an empty row (that is, a row below the AddNew row), or is not over the control cells area, the value of CellTip is Null, and the pop-up text box will not be displayed. If you modify CellTip so that it is no longer Null, the text box will display the changed value.

By setting the properties of the TipStyle object, you can control the background color, text color, and font of the pop-up text box. By default, the TipStyle object uses the system ToolTip colors and the font attributes of the current column.

You can program this event to provide context-sensitive help or tips to your users. For example, if the user points to column header, you can provide a more detailed description of the column. If the user points to a row, you can display instructions for selecting multiple records.

You can also provide content-sensitive help to your users using this event. By default, CellTip contains the text of the cell under the cursor. However, you can also determine other cell values if desired. Using the control's Row property and RowBookmark method, you can retrieve the bookmark of the row under the cursor, then use the CellValue or CellText method to derive other cell values.

See Also

TDBList and TDBCombo Controls

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback