Page 1 of 1

Bug WebViewGadget With FrameGadget [resolved]

Posted: Sat Aug 23, 2025 8:10 am
by thyphoon
Hello,
Run this code, you can't use scrollbar in the WebViewGadget. Remove the FrameGadget en run this code and you can use scrollbar in the WebviewGadget.
Can you confirm it's a bug ?

Code: Select all

OpenWindow(0, 100, 100, 400, 400, "Hello", #PB_Window_SystemMenu)
FrameGadget(0,15,15,370,200,"Bug with Frame gadget")
WebViewGadget(1, 30, 40, 345, 100) ;TODO Remove this line after test with it
SetGadgetText(1, "file://" + #PB_Compiler_Home + "examples/sources/Data/WebView/webview.html")

Repeat 
  Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow


// Moved From "Bugs - Windows" to "Coding Questions" (Kiffi)

Re: Bug WebViewGadget With FrameGadget

Posted: Sat Aug 23, 2025 8:59 am
by infratec
Have you read the help for FrameGadget() :?:

This works:

Code: Select all

OpenWindow(0, 100, 100, 400, 400, "Hello", #PB_Window_SystemMenu)
FrameGadget(0,15,15,370,200,"Bug with Frame gadget", #PB_Frame_Container)
WebViewGadget(1, 10, 20, 345, 100) ;TODO Remove this line after test with it
CloseGadgetList()
SetGadgetText(1, "file://" + #PB_Compiler_Home + "examples/sources/Data/WebView/webview.html")

Repeat 
  Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
So: no bug, wrong usage.

Re: Bug WebViewGadget With FrameGadget

Posted: Sat Aug 23, 2025 11:25 am
by thyphoon
infratec wrote: Sat Aug 23, 2025 8:59 am Have you read the help for FrameGadget() :?:
Since when has this existed #PB_Frame_Container ? I've been using Framegadget for years and I've never seen this. Shame on me🫣.
Thanks for the explanation.
I didn't even think to look at the framegadget help. 🙃. sorry 😅😅🙏

Re: Bug WebViewGadget With FrameGadget

Posted: Sat Aug 23, 2025 12:52 pm
by BarryG
thyphoon wrote: Sat Aug 23, 2025 11:25 amSince when has this existed #PB_Frame_Container ?
Only since v6.12, so no need to apologize or be ashamed (it's relatively new). I'm stuck with v6.10 so can't use that frame flag myself.

Re: Bug WebViewGadget With FrameGadget

Posted: Sat Aug 23, 2025 1:29 pm
by thyphoon
BarryG wrote: Sat Aug 23, 2025 12:52 pm
thyphoon wrote: Sat Aug 23, 2025 11:25 amSince when has this existed #PB_Frame_Container ?
Only since v6.12, so no need to apologize or be ashamed (it's relatively new). I'm stuck with v6.10 so can't use that frame flag myself.
😊🙏 It reassures me 🤣

Re: Bug WebViewGadget With FrameGadget

Posted: Sat Aug 23, 2025 2:58 pm
by kenmo
thyphoon wrote: Sat Aug 23, 2025 11:25 am Since when has this existed #PB_Frame_Container ? I've been using Framegadget for years and I've never seen this.
I just noticed it this week too, while investigating which gadgets support SetGadgetColor. Useful!

Re: Bug WebViewGadget With FrameGadget [resolved]

Posted: Thu Aug 28, 2025 6:57 pm
by Paul
Or just draw the FrameGadget last...

Code: Select all

OpenWindow(0, 100, 100, 400, 400, "Hello", #PB_Window_SystemMenu)
WebViewGadget(1, 30, 40, 345, 100) 
FrameGadget(0,15,15,370,200,"Bug with Frame gadget")
SetGadgetText(1, "file://" + #PB_Compiler_Home + "examples/sources/Data/WebView/webview.html")

Repeat 
  Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow

thyphoon wrote: Sat Aug 23, 2025 8:10 am Hello,
Run this code, you can't use scrollbar in the WebViewGadget. Remove the FrameGadget en run this code and you can use scrollbar in the WebviewGadget.
Can you confirm it's a bug ?

Code: Select all

OpenWindow(0, 100, 100, 400, 400, "Hello", #PB_Window_SystemMenu)
FrameGadget(0,15,15,370,200,"Bug with Frame gadget")
WebViewGadget(1, 30, 40, 345, 100) ;TODO Remove this line after test with it
SetGadgetText(1, "file://" + #PB_Compiler_Home + "examples/sources/Data/WebView/webview.html")

Repeat 
  Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow


// Moved From "Bugs - Windows" to "Coding Questions" (Kiffi)

Re: Bug WebViewGadget With FrameGadget [resolved]

Posted: Thu Aug 28, 2025 7:30 pm
by infratec
Paul wrote: Thu Aug 28, 2025 6:57 pm Or just draw the FrameGadget last...
Thats's the wrong way, because PB does not handle overlapping gadgets.
The container solution is the way to go.

Re: Bug WebViewGadget With FrameGadget [resolved]

Posted: Thu Aug 28, 2025 8:39 pm
by Paul
I have to disagree with this one.
The FrameGadget only overlaps if you put another Gadget over the outside frame that is drawn.
The center of the FrameGadget is hollow (so to speak) so nothing overlaps in the center.

What makes no sense is why the WebViewGadget seems to be the only Gadget that acts different with the FrameGadget.


infratec wrote: Thu Aug 28, 2025 7:30 pm
Paul wrote: Thu Aug 28, 2025 6:57 pm Or just draw the FrameGadget last...
Thats's the wrong way, because PB does not handle overlapping gadgets.
The container solution is the way to go.