[Gambas-user] Focus Events on DataControls

Nx GT-R BOY nxgtrturbo at ...626...
Sat Feb 16 19:53:11 CET 2008


 Hi everybody, (Hope this wont be junk but.. happy valentine's day)

Is there a way to know when a DataControls get focused (by keyboard), What I
have tried is:

PUBLIC SUB DataControl8_GotFocus()
Message.info("Got focus")
END

PUBLIC SUB DataControl8_KeyPress()
Message.Info("Key press")
END

PUBLIC SUB DataControl8_MouseDown()
Message.Info("Mouse down")
END

But nothing happens, the only way I knew that was focused was by the "Enter"
event, I think thats wrong, since "Enter" sound more like "hit enter by
keyboard", and the actual behavior is "action when focused by mouse (only)"

What I want to do is an automatic process, something like, get number one,
then get number two, and automatically give the sum, without the user needs
to push a button or something (I am working with Datacontrols, since all the
data must be saved)

I wanted Focused since most user like to use TAB button to move in each
field, so when the result field got focused, the sum would be calculated
automatically (thats in some way automatic, in some way not, but thats a
good (and fast for the user) option)

Thanks in advance.
-- 
Nx GT-R



More information about the User mailing list