BBjHtmlView::getText

Description

In BBj 7.0 and higher, this method returns the HTML code for the BBjHtmlView control.

Syntax

Return Value

Method

string

getText()

Parameters

None.

Return Value

Returns the underlying HTML code (i.e. text + HTML tags) for the BBjHtmlView control.

Remarks

In BUI, this returns only text that was set with setText.

Example

rem ' BBjHtmlView::getText()
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()
window! = sysgui!.addWindow(50,50,400,200,"BBjHtmlView",$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
html$ = "<html><head><style>p{margin:0;padding:0;}</style><title>BASIS</title></head>"
img$ = "http://www.basis.com/sites/basis.com/files/images/BusJGBetter.jpg"
html$ = html$ + "<body><img src="""+img$+""">"
url$ = "http://documentation.basis.com/BASISHelp/WebHelp/gridctrl2/bbjhtmlview.htm"
html$ = html$ + "<p>This is a <a href="""+url$+""">BBjHtmlView</a>."
html$ = html$ + "</body></html>"
htmlview! = window!.addHtmlView(101,25,25,350,150,html$)
htmlview!.setCallback(htmlview!.ON_PAGE_LOADED,"page")
process_events
eoj:
release
page:
event! = sysgui!.getLastEvent()
print event!.getEventName()
print htmlview!.getText()
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.