It does when I try it. Here is your original demo program, modified solely by the inclusion of the STYLEBITS. Now pressing the space bar does not result in the button handler being called (the difference being that the button never acquires input focus in the first place):
Code: Select all
NoMainWin
StaticText #1.debug "debug line", 0, 0, 200, 25
Button #1.Button1 "Button1", CallSub, UL, 50, 60, 100, 50
Stylebits #1.Button1 _WS_DISABLED,0,0,0
open "Disable / Hide Demonstration" for window as #1
#1 "TrapClose [Quit]"
#1 "Font Ariel 12"
#1.Button1 "!Disable"
'#1.Button1 "!Hide"
wait
[Quit]
close #1: end
sub CallSub CallingHandle$
#1.debug CallingHandle$
call delay 1
#1.debug ""
end sub
sub delay seconds
timer seconds*1000, [delay]
wait
[delay]
timer 0
end sub