WebGadget-Issues
Posted: Thu Apr 17, 2014 2:15 pm
Hello,
it seems, that the WebGadget doesn't fire any event. And GetGadgetItemText() doesn't return values.
Thanks in advance & Greetings ... Peter
it seems, that the WebGadget doesn't fire any event. And GetGadgetItemText() doesn't return values.
Code: Select all
Enumeration
#Window
#ButtonGadget
#WebGadget
EndEnumeration
Procedure WebGadgetEvents()
; not fired?
Debug "!!! WebGadgetEvent"
Debug "EventGadget(): " + EventGadget()
Debug "EventType(): " + EventType()
Debug "----"
EndProcedure
Procedure ButtonGadgetEvents()
; - GetGadgetItemText(): The following constants can be used to get information
Debug "#PB_Web_HtmlCode: " + GetGadgetItemText(#WebGadget, #PB_Web_HtmlCode) ; Get the html code from the gadget.
Debug "#PB_Web_PageTitle: " + GetGadgetItemText(#WebGadget, #PB_Web_PageTitle) ; Get the current title For the displayed page.
Debug "#PB_Web_StatusMessage: " + GetGadgetItemText(#WebGadget, #PB_Web_StatusMessage) ; Get the current statusbar message.
Debug "#PB_Web_SelectedText: " + GetGadgetItemText(#WebGadget, #PB_Web_SelectedText) ; Get the currently selected text inside the gadget.
EndProcedure
OpenWindow(#Window, 0, 0, 800, 600, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(#ButtonGadget, 10, 10, 300, 30, "GetGadgetItemText(#WebGadget, ...)")
BindGadgetEvent(#ButtonGadget, @ButtonGadgetEvents())
WebGadget(#WebGadget, 10, 50, WindowWidth(#Window) - 20, WindowHeight(#Window) - 60, "http://www.purebasic.com")
BindGadgetEvent(#WebGadget, @WebGadgetEvents())