[Gambas-user] uppercase input

Rob sourceforge-raindog2 at ...94...
Tue Mar 16 20:55:41 CET 2004


On Tuesday 16 March 2004 14:41, -fiero - wrote:
> how can i accept only UPPERCASE chars input on a textbox ?

It's easy to not accept any lowercase letters....

SUB TextArea1_KeyPress() 
  if not key.text = Ucase(key.text) then stop event
END

But I don't think that's what you wanted.  The following code 
will force all input to upper case:

PUBLIC SUB TextBox1_Change()

  textbox1.Text = UCase(textbox1.text)

END

I would have expected cascading events from that, but it seems to 
work fine.

Rob





More information about the User mailing list