BBjHtmlEdit::getClientVersion

Description

In BBj 19.0 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), "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" 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$ = iff(info(3,6)="5","BUI","GUI") + " " + info(1,4)
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$ = "http://www.basis.com/sites/basis.com/files/images/BusJGBetter.jpg"
html$ = html$ + "<img src="""+img$+""">"
url$ = "http://documentation.basis.com/BASISHelp/WebHelp/gridctrl2/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(err=*next)
clientVersion$ = htmledit!.getClientVersion(err=*next)
clientInfo$ = clientType$+" "+clientVersion$
window!.addStaticText(102,25,25,800,25,clientInfo$,$$)
print clientType$," ",clientVersion$
process_events
eoj:
release
page:
  gosub event
  print event!.getControl().getText()
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.



______________________________________________________________________________________

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