BUI logoDWC logoBBjBusyIndicator::setVisible

Description

In BBj 14.00 and higher, if visible is true, this method places a translucent glass pane over the browser window and makes the busy indicator visible in the middle of the browser. If visible is false, this method removes the glass pane and busy indicator from the browser.

Syntax

Return Value

Method

void

setVisible(boolean visible)

Parameters

Parameter

Description

visible

Boolean indicating whether the busy indicator should be made visible.

Return Values

None.

Example


rem ' BBjWebManager 

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
bui! = bbjapi().getWebManager()

appName$ = " (Not BUI)"
appName$ = bui!.getApplicationName(err=*next)
title$ = "BBjWebManager: " + appName$
touch = 0
touch = bui!.isTouchSupported(err=*next)
if touch then title$ = title$ + " (Touch)" else title$ = title$ + " (Not Touch)"

window! = sysgui!.addWindow(100,100,450,425,title$,$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")

window!.addGroupBox(100,25,25,400,125,"End Actions")
endApp! = window!.addRadioButton(101,50,50,75,25,"App",$0020$)
endUrl! = window!.addRadioButton(102,125,50,75,25,"URL",$0020$)
endMsg! = window!.addRadioButton(103,200,50,75,25,"Msg",$0020$)
endNone! = window!.addRadioButton(104,275,50,75,25,"None",$0020$)
endDefault! = window!.addRadioButton(105,350,50,70,25,"Default",$0020$)
endGroup! = window!.addRadioGroup()
endGroup!.add(endApp!)
endGroup!.add(endUrl!)
endGroup!.add(endMsg!)
endGroup!.add(endNone!)
endGroup!.add(endDefault!)
window!.addStaticText(106,30,100,60,25,"Value:",$8000$)
endValue! = window!.addEditBox(107,100,100,225,25,$$)
setEndAction! = window!.addButton(108,340,100,75,25,"Set",$$)
setEndAction!.setCallback(setEndAction!.ON_BUTTON_PUSH,"setEndAction")

window!.addGroupBox(200,25,200,400,125,"Err Actions")
errApp! = window!.addRadioButton(201,50,225,75,25,"App",$0020$)
errUrl! = window!.addRadioButton(202,125,225,75,25,"URL",$0020$)
errMsg! = window!.addRadioButton(203,200,225,75,25,"Msg",$0020$)
errNone! = window!.addRadioButton(204,275,225,75,25,"None",$0020$)
errDefault! = window!.addRadioButton(205,350,225,70,25,"Default",$0020$)
errGroup! = window!.addRadioGroup()
errGroup!.add(errApp!)
errGroup!.add(errUrl!)
errGroup!.add(errMsg!)
errGroup!.add(errNone!)
errGroup!.add(errDefault!)
window!.addStaticText(206,30,275,60,25,"Value:",$8000$)
errValue! = window!.addEditBox(207,100,275,225,25,$$)
setErrAction! = window!.addButton(208,340,275,75,25,"Set",$$)
setErrAction!.setCallback(setEndAction!.ON_BUTTON_PUSH,"setErrAction")

showBusy! = window!.addButton(1,25,375,100,25,"Busy",$$)
showBusy!.setCallback(showBusy!.ON_BUTTON_PUSH,"showBusy")
busyMessage! = window!.addEditBox(300,150,375,200,25,"Working...",$$)
 
gosub fetch
 
process_events

eoj:
release

fetch:
  endAction! = bui!.getEndAction(err=*return)
  switch endAction!.getActionType()
    case endAction!.ACTION_APP
       endApp!.setSelected(1)
       endValue!.setText(endAction!.getAppName())
       break
    case endAction!.ACTION_URL
       endUrl!.setSelected(1)
       endValue!.setText(endAction!.getUrl())
       break
    case endAction!.ACTION_MSG
       endMsg!.setSelected(1)
       endValue!.setText(endAction!.getMessage())
       break
    case endAction!.ACTION_NONE
       endNone!.setSelected(1)
       endValue!.setText("")
    break
    case endAction!.ACTION_DEFAULT
       endDefault!.setSelected(1)
       endValue!.setText("")
       break
  swend
  errAction! = bui!.getErrAction(err=*return)
  switch errAction!.getActionType()
    case errAction!.ACTION_APP
       errApp!.setSelected(1)
       errValue!.setText(errAction!.getAppName())
       break
    case errAction!.ACTION_URL
       errUrl!.setSelected(1)
       errValue!.setText(errAction!.getUrl())
       break
    case errAction!.ACTION_MSG
       errMsg!.setSelected(1)
       errValue!.setText(errAction!.getMessage())
       break
    case errAction!.ACTION_NONE
       errNone!.setSelected(1)
       errValue!.setText("")
       break
    case errAction!.ACTION_DEFAULT
       errDefault!.setSelected(1)
       errValue!.setText("")
       break
  swend
return
 
setEndAction:
  if endApp!.isSelected() then action! = bui!.appAction(endValue!.getText())
  if endUrl!.isSelected() then action! = bui!.urlAction(endValue!.getText())
  if endMsg!.isSelected() then action! = bui!.msgAction(endValue!.getText())
  if endNone!.isSelected() then action! = bui!.noneAction()
  if endDefault!.isSelected() then action! = bui!.defaultAction()
  bui!.setEndAction(action!,err=*return)
return
 
setErrAction:
  if errApp!.isSelected() then action! = bui!.appAction(errValue!.getText())
  if errUrl!.isSelected() then action! = bui!.urlAction(errValue!.getText())
  if errMsg!.isSelected() then action! = bui!.msgAction(errValue!.getText())
  if errNone!.isSelected() then action! = bui!.noneAction()
  if errDefault!.isSelected() then action! = bui!.defaultAction()
  bui!.setErrAction(action!,err=*return)
return
 
showBusy:
  busy! = bui!.getBusyIndicator(err=*return)
  busy!.setText(busyMessage!.getText())
  busy!.setVisible(1)
  wait 3
  busy!.setVisible(0)
return

See Also

BBjAPI

BBjBusyIndicator

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