Page 1 of 3
PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Fri Oct 24, 2025 9:52 am
by pf shadoko
I fixed the reported bugs except for:
- keyboard repetition
STARGÅTE:
- ButtonScreenGadget events are triggered, even if the button is pressed but the mouse button is released somewhere else. Usual behavior (e.g. under windows) is that the event is not triggered. To trigger an event, the mouse button must be released over the gadget.
-The TrackBarScreenGadget can be changed by mouse wheel even if it is in the background of an other window, hiding the gadget. Same for scroll areas
-Text in the StringScreenGadget can't be selected, the selection always vanishes immediately
(only occurs when the gadget height is insufficient for the font)
My :
- The window does not come to the foreground when clicking on one of its gadgets.
- When using the scroll wheel on a list view that is not completely filled, the content scrolls.
@STARGÅTE:
Mouse wheel action is inverted on a TrackBarScreenGadget(). The value decreases, when the mouse wheel is rotated up
I don't understand, for me it works like the trackbar gadget.
There are still many features to add: tooltip, requester, set color... No need to make requests right now.
You would be very kind to find a little fewer bugs this time!
Get to work!
Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Fri Oct 24, 2025 10:14 am
by STARGÅTE
pf shadoko wrote: Fri Oct 24, 2025 9:52 am
Mouse wheel action is inverted on a TrackBarScreenGadget(). The value decreases, when the mouse wheel is rotated up
I don't understand, for me it works like the trackbar gadget.
Thanks for the fixes.
Unfortunately, I never tried the original track bar gadget of PureBasic.
To my surprise, it's also there inverted

.
If you create two TrackBarGadgets (one vertical, one horizontal),
the values are increased when you rotate the mouse wheel upwards on the vertical one (like I would expect),
but the values are
decreasing when you rotate the mouse wheel upwards on the horizontal one (which makes absolutely no sens to me).
@Fred: Is this intentional? Because it is also inverted compare to the usual behavior on other programs on windows, e.g. like the mouse cursor speed setting or the sound volume.
I think this is a bug isn't it?
Code: Select all
If OpenWindow(0, 0, 0, 320, 320, "TrackBarGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
TrackBarGadget(1, 50, 10, 250, 30, 0, 10, #PB_TrackBar_Ticks)
TrackBarGadget(2, 10, 50, 30, 250, 0, 10, #PB_TrackBar_Ticks|#PB_TrackBar_Vertical)
SetGadgetState(1, 5)
SetGadgetState(2, 5)
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Case #PB_Event_Gadget
Debug GetGadgetState(EventGadget())
EndSelect
ForEver
EndIf
Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Fri Oct 24, 2025 10:40 am
by Fred
I agree it's weird, but it seems to be the default behavior for Win32 trackbar as we don't have any callback for the mouse wheel stuff. I also tried in Notepad++ which use Win32 controls and it's the same (Settings -> Preferences -> Editing -> Blinking Rate)
Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Fri Oct 24, 2025 11:41 am
by User_Russian
Beta 4 has not been released yet.
Or is this a message from the future?

Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Sat Oct 25, 2025 1:36 pm
by drgolf
Hello Pf, me again :
Screenwindowanimation bug : the window n-ui appear with animation.
Click buttons close and show : no animation !
PB 6.30 b4 x64 CBE, windows 11 pro
I know, i know, i am the only one to have this bug...
Code: Select all
#HelloWindow = 0
#QuitButton = 0
;
#nwind=1
#showwindow=1
#closewindow=2
;
InitSprite()
InitKeyboard():InitMouse()
ExamineDesktops():dx=DesktopWidth(0)*0.8:dy=DesktopHeight(0)*0.8
OpenWindow(0, 0, 0, DesktopUnscaledX(dx),DesktopUnscaledY(dy), "[Escape] to quit", #PB_Window_BorderLess | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, dx, dy, 0, 0, 0)
; Create the Screen UI
InitScreenGadgets()
TextScreenGadget(#PB_Any, 50, 0,500, 24, "The screen is a container, you can put gadgets without windows")
ButtonScreenGadget(#showwindow, 150, 260, 100, 32, "show")
ButtonScreenGadget(#closewindow, 270, 260, 100, 32, "close")
;
OpenScreenWindow(#HelloWindow, 100, 100, 300, 100, "Screen UI")
ScreenWindowAnimation(#HelloWindow, 0, 1000, 1, 0, -1, 0, -1)
TextScreenGadget(#PB_Any, 10, 25, 300, 24, "Hello World !")
ButtonScreenGadget(#QuitButton, 70, 60, 160, 32, "Quit")
;
OpenScreenWindow(#nwind, 100, 300, 300, 100, "N UI",0)
ScreenWindowAnimation(#nwind, 0, 1000, 1, 0, 1, 1, 1)
ScreenWindowAnimation(#nwind, 1, 1000, 1, 0, 1, 1, 1)
Repeat
; Top Window
While WindowEvent() : Wend
ClearScreen(RGB(0,0,0))
ExamineMouse()
ExamineKeyboard()
; Handle the screen UI events
If ScreenWindowEvent() = #PB_Event_Gadget
Select EventScreenGadget()
Case #QuitButton
End
Case #showwindow
HideScreenWindow(#nwind,0)
Case #closewindow
HideScreenWindow(#nwind,1)
EndSelect
EndIf
RenderScreenGadgets()
FlipBuffers()
Until KeyboardReleased(#PB_Key_Escape) Or MouseButton(3)
Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Sat Oct 25, 2025 2:25 pm
by PeDe
PB v6.30b4 x64, Raspberry Pi OS (Trixie, P500)
I can see the error too.
examples/3d/ScreenGadgetMultipleWindow.pb
1. Window 1: click button 'Show/Hide W2' -> Animation Window 2
2. Move Window 1; click button 'Show/Hide W2' -> No animation Window 2
3. Move Window 2; click button 'Show/Hide W2' -> Animation Window 2
4. goto 2.
Peter
Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Sat Oct 25, 2025 2:28 pm
by minimy
Hello, here some times is animated, other times is at cut with not animation.
Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Mon Oct 27, 2025 10:02 am
by pf shadoko
Gold medal to drgolf, the first to find the context of the bug (I couldn't reproduce it)
Silver medal to PeDe
Nothing for Minimy, who didn't find the context
Corrected
Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Fri Nov 21, 2025 5:21 am
by miso
If I leftclick a button, mouse right click repeats, triggers last gadget anywhere on screen. (except, if I leftclick anywhere on screen before rightclicking, nongadget leftclick clears the triggered gadget) A bit confusing description, but I could not describe with better words.
Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Fri Nov 21, 2025 2:10 pm
by minimy
Ohhhh!
At least one consolation prize for participating. I don't know, a clip or a thumbtack.

Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Fri Nov 21, 2025 4:28 pm
by miso
Not, bug, but important. Rendering the mouse should be a separate command, not included in the renderscreengadgets().
Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Sat Nov 22, 2025 10:09 am
by pf shadoko
@minimy
nothing !
@miso
no, but i implemented "ScreenMouseVisible" to show or hide mouse pointer
Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Sat Nov 22, 2025 10:48 am
by miso
@PfShadoko
Fair enough, thats the same

If I can hide the pointer, I can render mine later.
(the reason is to have control of the layering, like user sprites --> gui sprites --> user sprites --> mouse cursor)
Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Sat Nov 22, 2025 3:06 pm
by benubi
I hope those questions aren't reposts, but my curiosity grows over time.
Will there be an event-list implementation so as to write "classical" event loops or will it remain confined to 1 event per frame?
I am very delighted about the addition, but I'd also like to use menus and popup menus that would do great in homebrew 2D/3D editors. Do you plan on implementing this one day or are excluding it for the next few years/ever?
Merci tout le monde.
Re: PB 6.30 Beta 4 - ScreenGadget library - bug report
Posted: Tue Dec 09, 2025 12:41 pm
by PeDe
PB v6.30b5 arm64, Raspberry Pi OS (Trixie, Wayland)
With a German keyboard, capital letters cannot be entered in StringScreenGadget and EditorScreenGadget. Umlauts such as ‘ÄÖÜäöü’ and special characters such as ‘$°^µ€’ cannot be entered.
Example used for input:
examples/3d/ScreenGadgetMultipleWindow.pb
Peter