Problem: Listicon and webgadget with #PB_Web_HtmlCode

Just starting out? Need help? Post your questions and find answers here.
omit59
User
User
Posts: 63
Joined: Fri Mar 11, 2005 8:41 am
Location: Finland

Problem: Listicon and webgadget with #PB_Web_HtmlCode

Post by omit59 »

Having trouble with webgadget, check this:

Code: Select all

If OpenWindow(0, 0, 0, 320, 300, "ListIconGadgets", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
  ListIconGadget(0,  10,  25, 300, 100, "Column 1", 100)
  For b = 0 To 10
    AddGadgetItem(0, b, "Row " + Str(b))
  Next
    
  WebGadget(1,10,140,300,150,"")
    
  Repeat
    event = WaitWindowEvent()
    event_gadget = EventGadget()
      
    If event = #PB_Event_Gadget And event_gadget = 0
      SetGadgetItemText(1, #PB_Web_HtmlCode , "Row " + Str(GetGadgetState(0)))
    EndIf
    
  Until event = #PB_Event_CloseWindow
EndIf
Run this code and use listicon, it works ok with mouse and keyboard.
Then click webgadget with mouse left button, and after that listicon doesn't act normally anymore! It doesn't get activated, and keyboard isn't working.

So, is anyone else having same problem, or is this just me?

Timo
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

It's not just you omit59...same problem here. I'll dig a little to see if I can figure out what's happening before mentioning the "b" word. ;)
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

Please don't ask me to explain why....I'll just end up hurting myself :P

Code: Select all

If OpenWindow(0, 0, 0, 320, 300, "ListIconGadgets", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0)) 
  ListIconGadget(0,  10,  25, 300, 100, "Column 1", 100) 
  For b = 0 To 10 
    AddGadgetItem(0, b, "Row " + Str(b)) 
  Next 
  
  WebGadget(1,10,140,300,150,"about:blank") 
  
  Repeat 
    event = WaitWindowEvent() 
    event_gadget = EventGadget() 
    
    If event = #PB_Event_Gadget And event_gadget = 0 
      SetGadgetText(1, "about:blank")
      doit = 1
    EndIf 
    
    If EventType() = #PB_EventType_DownloadEnd And doit
      SetGadgetItemText(1, #PB_Web_HtmlCode, "Row " + Str(GetGadgetState(0))) 
      doit = 0 
    EndIf 
    
  Until event = #PB_Event_CloseWindow 
EndIf 
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
omit59
User
User
Posts: 63
Joined: Fri Mar 11, 2005 8:41 am
Location: Finland

Post by omit59 »

@Sparkie,

I'm using webgadget (which is not so clever) for my program , but it helps so much when using different colors and fonts (printing too).

So this will be a big help for me, thank You very much!

Timo
Post Reply