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 or DWC), "Swing" (basic HTML 3.2), "JavaFX" (WebKit), "Chromium").

Remarks

None.

Example

rem ' BBjHtmlView::getClientType

client = 0
if (info(3,6)<>"5" and info(3,6)<>"6") 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,900,650,url$,$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
window!.setCallback(window!.ON_RESIZE,"resize")
htmlview! = window!.addHtmlView(101,25,50,850,575,html$)
htmlview!.setUrl(url$)
clientType$ = htmlview!.getClientType(err=*next)
clientVersion$ = htmlview!.getClientVersion(err=*next)
clientInfo$ = clientType$+" "+clientVersion$
window!.addStaticText(102,25,15,800,40,clientInfo$,$$)
print clientType$," ",clientVersion$
process_events

eoj:
release

resize:
    event! = sysgui!.getLastEvent()
    w = event!.getWidth()
    h = event!.getHeight()
    htmlview!.setSize(w-50,h-75)
return

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

BBjHtmlView

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