[Gambas-user] TextBox and CR

Rolf-Werner Eilert eilert-sprachen at ...221...
Tue Apr 20 09:42:37 CEST 2010


Good morning everyone!

In one of my programs there is a TextBox enabling the user to type in a 
search word. The TextBox seems to ignore a Return at the end, so I chose 
a "?" at the end of the string to indicate "go and search".

It's a bit roundabout, however, isn't there a way to tell TextBox to 
include a CR in the string when Return is pressed?

This is the code now ("Suche" means "Search"):

PUBLIC SUB Suche_Change()


   IF trim(Suche.Text) = "" THEN RETURN

   IF String.Right(Suche.Text, 1) <> "?" THEN RETURN

   SucheStarten(Suche.Text)

END

Any easy way to make this react to a CR?

Thanks for your ideas!

Rolf




More information about the User mailing list