Navigation:  Classes > bBrowser >

bBrowser:ToolTipMode

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

Mode that defines whether bBrowser supports different ToolTips.

Class

bBrowser

Type

Access / Assign

Data Type

Symbol

Description

The bBrowser supports several modes for ToolTips. The following table defines the supported modes:

 

Mode

Description

#Control

For the whole bBrowser, only one ToolTip is supported. The ToolTip can be defined with the access Control:ToolTipText.

#Column

Each column will have a unique ToolTip. The ToolTip for the column is determined with the callback method CellToolTip().

#Cell

Each individual data cell will have a unique ToolTip. The ToolTip for the data cell is determined with the callback method CellToolTip().

 

Before the callback method CellToolTip() is called, the following check is executed:

 

If the ToolTip should to be determined for a column value and the column value is not completely visible in the cell then the column value is used as ToolTipText as default. The ToolTipText can be replaced by another text in the callback method CellToolTip() (see also bCellToolTipEvent:ToolTipText).

 

After creating a bBrowser control the mode #Control is active.

Samples

In the following sample for each data cell a different ToolTip is shown. As ToolTip the HyperLabel of the column and the column and row number of the data cell is shown.

 

METHOD PostInit() CLASS myDataWindow

       odbsCUSTOMER := DBServer{"CUSTOMER"}

       oBrowser := bBrowser{oOwner,;

                                                       1000,;

                                                       Point{0, 0},;

                                                       Dimension{300, 250}}

       oBrowser:ToolTipMode := #Cell

       oBrowser:Use(odbsCUSTOMER)

       oBrowser:Show()

 

METHOD CellToolTip(oCellToolTipEvent) CLASS myDataWindow

       // callback methode for determining ToolTips

       LOCAL oBrowser AS bBrowser

       LOCAL oColumn  AS bDataColumn

       LOCAL oCell    AS bCell

       LOCAL cToolTip AS STRING

 

         // get bBrowse

       oBrowser := oCellToolTipEvent:Control

 

       // get cell

       oCell := oCellToolTipEvent:Cell

 

       // get column from cell

       oColumn := oBrowser:GetOpenColumn(oCell:Column)

       IF !EMPTY(oColumn)

               // define ToolTip

               cToolTip := ""

               IF !EMPTY(oColumn:HyperLabel) .and. !EMPTY(oColumn:HyperLabel:Description)

                       cToolTip := oColumn:HyperLabel:Description+CRLF

               ENDIF

               cToolTip += "Column: "+NTrim(oCell:Column)+CRLF;

                                       +"Row: "+NTrim(oCell:Row)

 

               oCellToolTipEvent:ToolTipText := cToolTip

       ENDIF

       RETURN TRUE

See Also

bBrowser:CellToolTip()

 


Page url: http://www.YOURSERVER.com/index.html?bbrowser_tooltipmode.htm