BBjHtmlEdit::getClientVersion

Description

In BBj 19.00 and higher, this method returns the client version for this BBjHtmlEdit control.

Syntax

Return Value

Method

string

getClientVersion()

Parameters

None.

Return Value

Returns the version of the BBjHtmlEdit control ("Browser" (BUI or DWC), "Swing" (basic HTML 3.2), "JavaFX" (WebKit), "Chromium"). The client versions will change over time.

Remarks

None.

Example

rem ' BBjHtmlEdit::getClientVersion

client = 0
if (info(3,6)<>"5" and info(3,6)<>"6") then
    client = msgbox("BBjHtmlEdit Client",7+32+512,"BBjHtmlEdit","Swing","JavaFX","Chromium")
    switch client
        case 1; rem ' Swing
            print stbl("!OPTIONS","CHROMIUM_HTMLEDIT=FALSE",ERR=*NEXT)
            print stbl("!OPTIONS","JAVAFX_HTMLEDIT=FALSE",ERR=*NEXT)
            break
        case 2; rem ' JavaFX
            print stbl("!OPTIONS","CHROMIUM_HTMLEDIT=FALSE",ERR=*NEXT)
            print stbl("!OPTIONS","JAVAFX_HTMLEDIT=TRUE",ERR=*NEXT)
            break
        case 3; rem ' Chromium
            print stbl("!OPTIONS","CHROMIUM_HTMLEDIT=TRUE",ERR=*NEXT)
            print stbl("!OPTIONS","JAVAFX_HTMLEDIT=TRUE",ERR=*NEXT)
            break
    swend
endif
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
title$ = "BBjHtmlEdit::getClientVersion"
x = 50, y = 50, w = 850, h = 450
window! = sysgui!.addWindow(x,y,w,h,title$,$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
window!.setCallback(window!.ON_RESIZE,"resize")
html$ = "<html><head><style>p{margin:0;padding:0;}</style></head><body>"
img$ = "https://www.basis.cloud/sites/basis.com/files/images/BusJGBetter.jpg"
html$ = html$ + "<img src="""+img$+""">"
url$ = "https://documentation.basis.cloud/BASISHelp/WebHelp/bbjobjects/Window/bbjhtmledit/BBjHtmlEdit.htm"
html$ = html$ + "<p>This is a <a href="""+url$+""">BBjHtmlEdit</a>."
html$ = html$ + "</body></html>"
htmledit! = window!.addHtmlEdit(101,25,75,w-50,h-100,html$)
htmledit!.setCallback(htmledit!.ON_PAGE_LOADED,"page")
clientType$ = htmledit!.getClientType()
clientVersion$ = htmledit!.getClientVersion()
clientInfo$ = clientType$+" "+clientVersion$
clientInfo! = window!.addStaticText(102,25,10,800,40,clientInfo$,$$)
print clientInfo$
process_events

eoj:
release

page:
    gosub event
    print event!.getControl().getText()
    clientType$ = htmledit!.getClientType()
    clientVersion$ = htmledit!.getClientVersion()
    clientInfo$ = clientType$+" "+clientVersion$
    clientInfo!.setText(clientInfo$)
return

resize:
    gosub event
    w = event!.getWidth()
    h = event!.getHeight()
    htmledit!.setSize(w-50,h-100)
return

event:
    event! = sysgui!.getLastEvent()
    print event!.getEventName()
return

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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