[solved] Can't see which gadget has the focus
Posted: Sun Mar 13, 2016 12:33 pm
Hi,
the following code seems to work as expected, i.e. when I press repeatedly [Space] and [Tab], then the Debug window shows
It's the same whether I don't specify a subsystem, or whether I specify "gtk2" as subsystem.
Is there any trick for displaying the focus rectangle?
the following code seems to work as expected, i.e. when I press repeatedly [Space] and [Tab], then the Debug window shows
However, I can't see which gadget has the focus. This is of course required in a real program.Gadget #0
Gadget #1
Gadget #2
Gadget #0
etc.
It's the same whether I don't specify a subsystem, or whether I specify "gtk2" as subsystem.
Is there any trick for displaying the focus rectangle?
Code: Select all
; PB 5.42 LTS x64 on Linux Mint 17.3 Cinnamon
OpenWindow(0, 0, 0, 150, 150, "Focus test")
ButtonGadget(0, 30, 20, 80, 30, "Button 0")
ButtonGadget(1, 30, 60, 80, 30, "Button 1")
ButtonGadget(2, 30, 100, 80, 30, "Button 2")
SetActiveGadget(0)
Repeat
event = WaitWindowEvent()
Select event
Case #PB_Event_Gadget
Debug "Gadget #" + GetActiveGadget()
EndSelect
Until event = #PB_Event_CloseWindow