BBjGrid::getToolTipText

Description

In BBj 9.0 and higher, this method returns the tooltip text (also known as short cue in BBx) for the BBjGrid or for a specific grid column or cell.

Syntax

Return Value

Method

string

getToolTipText()

string

getToolTipText(int col)

string

getToolTipText(int row, int col)

Parameters

Variable

Description

row

The row of a cell-specific tooltip.

col

The column of a cell-specific or column-specific tooltip.

Return Value

Returns the tooltip text for the BBjGrid or for a specific grid column or cell.

Remarks

None.

Example

rem ' BBjGrid::setToolTipText

sysgui = unt
open (sysgui)"X0"
bbjapi! = BBjAPI()
sysgui! = bbjapi!.getSysGui()
window! = sysgui!.addWindow(100,100,300,200,"Grid Tooltips",$00010003$)
window!.setCallback(bbjapi!.ON_CLOSE,"eoj")
rows=10,cols=10
grid! = window!.addGrid(101,102,103,10,10,280,180,$91ce$,rows,cols)
grid!.setRowHeight(25)
grid!.setRowHeaderWidth(25)
grid!.setDefaultColumnWidth(40)
grid!.setHorizontalScrollable(1)
grid!.setVerticalScrollable(1)
grid!.setToolTipText("Grid tooltip")
text$ = grid!.getToolTipText()
print "Tool tip text for row="+str(row)+",col="+str(col)+" = "+text$
for row=0 to rows-1
    for col = 0 to cols-1
        text$=str(row)+","+str(col)
        grid!.setCellText(row,col,text$)
        switch mod(col,3)
            case 0
                grid!.setToolTipText(row,col,"Grid cell tooltip: row="+str(row)+",col="+str(col))
                text$ = grid!.getToolTipText(row,col)
                print "Tool tip text for row="+str(row)+",col="+str(col)+" = "+text$
                break
            case 1
                grid!.setToolTipText(col,"Grid column tooltip: col="+str(col))
                text$ = grid!.getToolTipText(col)
                print "Tool tip text for col="+str(col)+" = "+text$
                break
        swend
    next col
next row
header! = grid!.getRowHeader()
header!.setToolTipText("Grid row header tooltip")
for row=0 to rows-1
    text$=str(row)
    header!.setCellText(row,text$)
    switch mod(row,2)
        case 0
            header!.setToolTipText(row,"Grid row header tooltip: row="+str(row))
            text$ = header!.getToolTipText(row)
            print "Row header tool tip text for row="+str(row)+" = "+text$
            break
    swend
next row
header! = grid!.getColumnHeader()
header!.setToolTipText("Grid column header tooltip")
for col=0 to cols-1
    text$=str(col)
    header!.setCellText(col,text$)
    switch mod(col,2)
        case 0
            header!.setToolTipText(col,"Grid column header tooltip: col="+str(col))
            text$ = header!.getToolTipText(col)
            print "Column header tool tip text for col="+str(col)+" = "+text$
            break
    swend
next col
grid!.focus()
process_events

eoj:
release

See Also

BBjAPI

BBjSysGui

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.