Doesnt work. Try the code below...
WinWidth=750:WinHeight=550
WinX=(ClientWidth(Desktop())-WinWidth)/2
WinY=(ClientHeight(Desktop())-WinHeight)/2
Window = CreateWindow("Centred Window",WinX,WinY,WinWidth,WinHeight,0,1)
htmlview=CreateHtmlView(0,0,Winwidth-5,WinHeight-70,Window)
HtmlViewGo htmlview,"www.blitzbasic.com"
button=CreateButton("Get URL",WinWidth/2,WinHeight-60,50,20,Window,1)
While WaitEvent()<>$803
If EventSource()=Button
a$=GadgetText(htmlview) ; Try and get the url
Notify "URL = "+a$ ; Returns null :-(
EndIf
Wend
End
The weird thing about the GadgetText command is that I have just looked at the command summary and there isnt a GadgetText(gadget) command. But the compiler allows you to compile it. Weird! It must be a command that mark hasn't finished implementing yet.
There is a GadgetItemText$( gadget,index) command but this command may only be used with combobox, listbox and tabber gadgets.
WinWidth=750:WinHeight=550
WinX=(ClientWidth(Desktop())-WinWidth)/2
WinY=(ClientHeight(Desktop())-WinHeight)/2
Window = CreateWindow("Centred Window",WinX,WinY,WinWidth,WinHeight,0,1)
htmlview=CreateHtmlView(0,0,Winwidth-5,WinHeight-70,Window)
HtmlViewGo htmlview,"www.blitzbasic.com"
button=CreateButton("Get URL",WinWidth/2,WinHeight-60,50,20,Window,1)
While WaitEvent()<>$803
If EventSource()=Button
a$=GadgetText(htmlview) ; Try and get the url
Notify "URL = "+a$ ; Returns null :-(
EndIf
Wend
End
The weird thing about the GadgetText command is that I have just looked at the command summary and there isnt a GadgetText(gadget) command. But the compiler allows you to compile it. Weird! It must be a command that mark hasn't finished implementing yet.
There is a GadgetItemText$( gadget,index) command but this command may only be used with combobox, listbox and tabber gadgets.