BBjHtmlView::getClientType

Description

In BBj 19.0 and higher, this method returns the client type for this BBjHtmlView control.

Syntax

Return Value

Method

string

getClientType()

Parameters

None.

Return Value

Returns the client type for the BBjHtmlView control ("Browser" (BUI), "Swing" (basic HTML 3.2), "JavaFX" (WebKit), "Chromium").

Remarks

None.

Example

rem ' BBjHtmlView::getClientType
client = 0
if info(3,6)<>"5" then
   client = msgbox("BBjHtmlView Client",7+32+512,"BBjHtmlView","Swing","JavaFX","Chromium")
   switch client
      case 1; rem ' Swing
         print stbl("!OPTIONS","CHROMIUM_HTMLVIEW=FALSE",ERR=*NEXT)
         print stbl("!OPTIONS","JAVAFX_HTMLVIEW=FALSE",ERR=*NEXT)
         break
      case 2; rem ' JavaFX
         print stbl("!OPTIONS","CHROMIUM_HTMLVIEW=FALSE",ERR=*NEXT)
         print stbl("!OPTIONS","JAVAFX_HTMLVIEW=TRUE",ERR=*NEXT)
         break
      case 3; rem ' Chromium
         print stbl("!OPTIONS","CHROMIUM_HTMLVIEW=TRUE",ERR=*NEXT)
         print stbl("!OPTIONS","JAVAFX_HTMLVIEW=TRUE",ERR=*NEXT)
         break
   swend
endif
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
url$ = "http://useragentstring.com"
window! = sysgui!.addWindow(50,50,850,650,url$,$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
htmlview! = window!.addHtmlView(101,25,50,800,575,html$)
htmlview!.setUrl(url$)
clientType$ = htmlview!.getClientType(err=*next)
clientVersion$ = htmlview!.getClientVersion(err=*next)
clientInfo$ = clientType$+" "+clientVersion$
window!.addStaticText(102,25,15,800,25,clientInfo$,$$)
print clientType$," ",clientVersion$
process_events
eoj:
release

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

BBjHtmlView

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



______________________________________________________________________________________

Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.