[Gambas-user] Any way of excluding a control from the tab order?

Richard richard.j.walker at ...247...
Tue Mar 25 14:01:12 CET 2008


On Tuesday 25 Mar 2008 08:51, charlesg wrote:
> Wow! Somebody who thinks like me about data entry.
>
> I can’t answer the question but I am good at tangents! I have always used
> the <return> key (in VB and now GB) to control flow. That <tab> key is a
> useless key in a useless position and you have to have three hands to make
> decent use of a mouse under data entry conditions.
>
> PUBLIC SUB txtName_keyRelease()
> IF key.Code = key.Return OR key.Code = 65421 THEN
>     	      txtDate.SetFocus
>     	ENDIF
>
> I should be able to use key.Enter for the numeric pad Enter key but last
> time I tried under GTK it did not work.

As Benoit said above you can easily use the wrong constant for checking the 
enter key. The Key.ENTER constant appears on the help page well before 
Key.RETURN. It took me over a year to realise that Key.RETURN exists, but 
that is exactly what my keyboards provide when I press ENTER. 

Now I always check for Key.ENTER a n d Key.RETURN

SELECT keycode
	CASE Key.ENTER, Key.RETURN
		'Enter was pressed
	....
END SELECT




More information about the User mailing list