M Mark Stuart Active Member Licensed User Longtime User Aug 29, 2017 #1 Hi, How do I make a button the default button when the user presses Enter on a form? Thanx, Mark S.
Daestrum Expert Licensed User Longtime User Aug 30, 2017 #2 assuming b is the button B4X: ... Dim jo as JavaObject jo = b jo.RunMethod("setDefaultButton",Array(True)) ... It will only work providing no other control on the form consumed the enter key press. Upvote 0
assuming b is the button B4X: ... Dim jo as JavaObject jo = b jo.RunMethod("setDefaultButton",Array(True)) ... It will only work providing no other control on the form consumed the enter key press.
M Mark Stuart Active Member Licensed User Longtime User Aug 30, 2017 #3 Daestrum, Thank you, that works exactly as I'd expect... Colors the default button a light blue and when Enter is pressed, executes the default button script. Thanx, Mark S. Upvote 0
Daestrum, Thank you, that works exactly as I'd expect... Colors the default button a light blue and when Enter is pressed, executes the default button script. Thanx, Mark S.