This feature is not available to spinner, checkbox and button so far. I have tried to create an event (thanks to Claudio) to solve this.
Please run this sample:
Code: Select all
#include <hmg.ch>
Function Main
set navigation extended
define window main at 0, 0 width 400 height 300 main
define textbox t1
row 10
col 10
width 100
end textbox
define spinner s1
row 40
col 10
width 100
rangemin 1
rangemax 100
value 1
end spinner
define checkbox c1
row 70
col 10
caption 'Sample'
end checkbox
define button click
row 100
col 10
caption 'Click'
action msginfo( 'Just a test' )
end button
end window
create event procname ImitateEnterKey() HWND GetControlHandle( 's1', 'main' )[ 1 ] // getcontrolhandle of spinner returns an array of two handles one for textbox and another for up/down button.
create event procname ImitateEnterKey() HWND GetControlHandle( 'c1', 'main' )
create event procname ImitateEnterKey() HWND GetControlHandle( 'click', 'main' )
Main.Center
Main.Activate
Return
function ImitateEnterKey()
local nVKDown := HMG_GetLastVirtualKeyDown()
if nVKDown == VK_RETURN
HMG_CleanLastVirtualKeyDown()
_Pushkey(VK_TAB)
endif
return nil