[Gambas-user] Hello all!!! How i can make my program to under...

Steven James Drinnan steven at ...2097...
Fri May 8 04:14:57 CEST 2009


Where are you checking this?
Key press event.

I would wait for another key like the return key. And then check.

if key.code = key.return then
	if textbox1.text="c" then
		textbox1.text="1"
	else
		if textbox1.text="cl" then
			textbox1.text="2"
		end if
	end if
end if

this will tell the computer that the user has finished inputing.

On Thu, 2009-05-07 at 20:18 +0300, vlahonick vlahonick wrote:
> Hello all!!!
> 
> How i can make my program to understand when i write "c" is different from "cl" ?
> 
> EXAMPLE
> 
> if textbox1.text="c" then
> textbox1.text="1"
> else
> if textbox1.text="cl" then
> textbox1.text="2"
> end if
> end if
> 
> The problem is that when i am trying to write "cl" the result i get is
> "1l" and this because the program doesnt understand that i want to
> the result "1" ONLY if i write "c" and the result "2" when i write both letters.
> 
> I tried to fixed it with the Len argument but i didnt make it.
> 
> Any ideas how i can do that with the select case or somehow?
> 
> Of course it will be fixed easy if instead of "cl" i put "Cl" but
> in the program i want to create this is not an option because
> i will use more elements starting with the "c" latter and i cant
> obligate the user to have many instructions how to use the
> program.For example to say to the user if u want a correct
> result wirte c but if u want to write cl write Cl or if u want to
> write cs write sc.
> 
> Thanks u all in advance!!! :D
> Please for ANY IDEAS contact me at tsopanotragi at ...67... :D
> 
> regards vlahonick
> 
> _________________________________________________________________
> More than messages–check out the rest of the Windows Live™.
> http://www.microsoft.com/windows/windowslive/
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 





More information about the User mailing list