Hello!
Normally, in every application, we see the current active gadget (stringGadget with active caret, or buttonGadget surrounded by a dotted frame for example) but in my software made with PureBasic it is not always visible, I mean, that stringGadgets are always visible, but the buttons do *not* receive the dotted frame, when I press the TAB key to jump between the gadgets. What is preventing this, or what may prevent this happening? Sorry that I cannot include an example here as the package has become too large.
Any idea ?
Active Gadget
Active Gadget
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
Re: Active Gadget
Been discussed lots of times!
Freak has stated that this should be addressed in PB 4.5. http://www.purebasic.fr/english/viewtop ... logMessage
In the meantime, if you search on #WM_UPDATEUISTATE you might find some remedies.

Freak has stated that this should be addressed in PB 4.5. http://www.purebasic.fr/english/viewtop ... logMessage
In the meantime, if you search on #WM_UPDATEUISTATE you might find some remedies.
I may look like a mule, but I'm not a complete ass.
Re: Active Gadget
Egypt my love
Re: Active Gadget
Erm... to me it's my first discussion about this subject
As this is not urgent at this time, I will wait for the version 4.5. Glad to know that my programs are okay.
Thank you very much srod & Rashad.

As this is not urgent at this time, I will wait for the version 4.5. Glad to know that my programs are okay.
Thank you very much srod & Rashad.
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
Re: Active Gadget
as it was urgent in my case
here´s my workaround :
Windows only, PB4.31+

Windows only, PB4.31+
Code: Select all
#UIS_SET = 1
#UIS_CLEAR = 2
#UIS_INITIALIZE = 3
#UISF_HIDEFOCUS = 1
#UISF_HIDEACCEL = 2
#UISF_ACTIVE = 4
Procedure SetUIState(hwnd.i,LoWord.w,HiWord.w)
SendMessage_(hwnd,#WM_UPDATEUISTATE,(LoWord & $FFFF) | (HiWord<<16),0)
EndProcedure
If OpenWindow(0, 0, 0, 222, 200, "ButtonGadgets",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
ButtonGadget(0, 10, 10, 200, 20, "Button 1")
ButtonGadget(1, 10, 40, 200, 20, "Button 2")
SetUIState(WindowID(0),#UIS_CLEAR,#UISF_HIDEFOCUS|#UISF_HIDEACCEL)
SetActiveGadget(0)
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Re: Active Gadget
Many thanks ABBKlaus for your temporary solution.
Hope however that PB 4.50 will come soon
Hope however that PB 4.50 will come soon

- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%