Webgadget help!!??

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by momo.

Hi
I wanted to do a browser for testing the Webgadget.
I can go to any site i want but i cannot click on any link on the site?:) this is the code:



OpenWindow(1,0,0,1024,712,#PB_window_minimizegadget | #PB_window_maximizegadget | #PB_Window_sizegadget | #PB_Window_ScreenCentered,"second")
mama = WindowID()
CreateGadgetList(mama)
StringGadget(11,0,0,900,20,GetGadgetText(11))
aktu:

ButtonGadget(12,900,0,90,25,"aktualisieren")
WebGadget(13,0,25,1024,650,GetGadgetText(11))
ActivateGadget(12)

Repeat

y = WindowHeight()
x = WindowWidth()
EventID = WindowEvent()

If EventID = #PB_EventGadget

Select EventGadgetID()
Case 12
Goto aktu
EndSelect
EndIf

If eventID = #PB_eventclosewindow
ende = 1

EndIf

Until ende = 1
End

I hope someone has got a solution!!

momo

Don't Look so stupid
I've got no Signature!!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by webmatze.

You must not use WebGadget(13,0,25,1024,650,GetGadgetText(11)) to change the state of a gadget.
Use SetGadgetText(13, GetGadgetText(11)) instead!

Code: Select all

OpenWindow(1,0,0,1024,712,#PB_window_minimizegadget | #PB_window_maximizegadget | #PB_Window_sizegadget | #PB_Window_ScreenCentered,"second")mama = WindowID()
CreateGadgetList(mama)
StringGadget(11,0,0,900,20,"")
ButtonGadget(12,900,0,90,25,"aktualisieren")
WebGadget(13,0,25,1024,650,"")
ActivateGadget(12)


y = WindowHeight()
x = WindowWidth()

Repeat 
  EventID = WaitWindowEvent()

  If EventID = #PB_EventGadget
    Select EventGadgetID()
      Case 12
        Gosub aktu
    EndSelect
  EndIf

  If eventID = #PB_eventclosewindow
    ende = 1
  EndIf

Until ende = 1

End

aktu:
  SetGadgetText(13, GetGadgetText(11))
Return
Registered Purebasic User.
Using Windows XP on an AMD System...
Post Reply