[Gambas-user] Capturing & Modifying Incoming Key Values

Rob sourceforge-raindog2 at ...94...
Fri Jun 17 06:30:16 CEST 2005


On Thursday 16 June 2005 20:51, Brad Nelson wrote:
> & write.  However, in Gambas, we read the value of the pressed key
> through the Key object.  However, Key.Code is read-only.  How can I
> change the value of Key.Code before it hits the object?

I don't think there's any way to do exactly that presently.  But at 
one time you couldn't even cancel the event, and now you can do so 
with STOP EVENT.

Until such time as the Key object has read-write properties, if ever, 
I think you could probably do what you want to do by inserting the 
desired key value into the control and then doing STOP EVENT... 
that's how I've done things like forcing input to be all-caps in a 
COBOL editor, for example.

Rob







More information about the User mailing list