Bug WebViewGadget With FrameGadget [resolved]

Just starting out? Need help? Post your questions and find answers here.
User avatar
thyphoon
Enthusiast
Enthusiast
Posts: 355
Joined: Sat Dec 25, 2004 2:37 pm

Bug WebViewGadget With FrameGadget [resolved]

Post 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)
Last edited by thyphoon on Sat Aug 23, 2025 11:21 am, edited 1 time in total.
infratec
Always Here
Always Here
Posts: 7613
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Bug WebViewGadget With FrameGadget

Post 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.
User avatar
thyphoon
Enthusiast
Enthusiast
Posts: 355
Joined: Sat Dec 25, 2004 2:37 pm

Re: Bug WebViewGadget With FrameGadget

Post 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 😅😅🙏
BarryG
Addict
Addict
Posts: 4168
Joined: Thu Apr 18, 2019 8:17 am

Re: Bug WebViewGadget With FrameGadget

Post 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.
User avatar
thyphoon
Enthusiast
Enthusiast
Posts: 355
Joined: Sat Dec 25, 2004 2:37 pm

Re: Bug WebViewGadget With FrameGadget

Post 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 🤣
User avatar
kenmo
Addict
Addict
Posts: 2043
Joined: Tue Dec 23, 2003 3:54 am

Re: Bug WebViewGadget With FrameGadget

Post 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!
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1285
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Re: Bug WebViewGadget With FrameGadget [resolved]

Post 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)
Image Image
infratec
Always Here
Always Here
Posts: 7613
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Bug WebViewGadget With FrameGadget [resolved]

Post 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.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1285
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Re: Bug WebViewGadget With FrameGadget [resolved]

Post 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.
Image Image
Post Reply