
BBjHtmlView::getUrl
Description
In BBj 7.0 and higher, this method returns the URL associated with this BBjHtmlView.
Syntax
Return Value |
Method |
---|---|
string |
getUrl() |
Parameters
None.
Return Value
Returns the name of current URL of the BBjHtmlView control.
Remarks
None.
Example
Copy
BBjHtmlView::getUrl Example
rem ' BBjHtmlView::getUrl
url$ = "https://en.wikipedia.org"
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()
window! = sysgui!.addWindow(50,50,800,600,"BBjHtmlView::getUrl",$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
htmlview! = window!.addHtmlView(101,25,50,750,525,"",$$)
htmlview!.setCallback(htmlview!.ON_PAGE_LOADED,"event")
htmlview!.setCallback(htmlview!.ON_HYPERLINK_ENTER,"event")
htmlview!.setCallback(htmlview!.ON_HYPERLINK_EXIT,"event")
htmlview!.setCallback(htmlview!.ON_HYPERLINK_ACTIVATE,"event")
htmlview!.setUrl(url$)
message! = window!.addStaticText(102,25,10,750,30,"",$$)
process_events
eoj:
release
event:
event! = sysgui!.getLastEvent()
message!.setText(event!.getEventName()+" "+event!.getUrl())
print htmlview!.getUrl()
return
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.