I have added an IE activex Control in one of my windows. I am wondering if there is a way to add a refresh botton to the screen and a status bar to show the page loading… any help would be appreciated
Thanks
You can add a button next to the IE component that has the following actionPerformed event handler:comp = event.source.parent.getComponent('Internet Explorer Viewer')
comp.invokeFunction("Refresh", [])
Displaying a progress bar when the page is loading ia bit tricky. First add the Progress Bar to the window and set the Indeterminate property to True. Next, add a Timer component to the window and put the following script on the propertyChange event handler:if event.propertyName == "value":
comp = event.source.parent.getComponent('Internet Explorer Viewer')
state = str(comp.getProperty("ReadyState", []))
if state != "4":
event.source.parent.getComponent('Progress Bar').visible = 1
else:
event.source.parent.getComponent('Progress Bar').visible = 0
Of course set the Running property of the Timer to True as well. Hope this helps.