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
|