Another Win32Lib problem...
- Posted by Davi Figueiredo <davitf at USA.NET> Feb 12, 1999
- 433 views
Hello, I was trying to create a Windows program using Win32Lib and ran into a problem: I wanted to create a SLE which would show asterisks instead of the characters typed (like when you type a password). But then I noticed that, when the program read the contents of the SLE, all the letters were converted to uppercase! The following program is an example of the problem. There are two boxes: the first is a normal SLE, and the second masks the characters. When the "Copy 1 to 2" button is pressed, the contents of the first SLE are copied to the second one, and when the "Copy 2 to 1" button is pressed, the contents of the second SLE are copied to the first one. Try typing something in the first box, copying it into the second one and copying it back into the first one, or simply typing something into the second box and copying it into the first one, and you'll see what I mean. -- begin slebug.exw -- include win32lib.ew constant = Win =3D create( Window, "SLE Bug Example", 0, Default, Default, 300, 100, 0 ), = -- normal SLE Sle1 =3D create( EditText, "", Win, 10, 10, 120, 20, 0), -- shows asterisks instead of chars Sle2 =3D create( EditText, "", Win, 10, 40, 120, 20, '*'), Button1 =3D create( PushButton, "Copy 1 to 2", Win, 140, 10, 120, 20, 0 ), Button2 =3D create( PushButton, "Copy 2 to 1", Win, 140, 40, 120, 20, 0 ) procedure onClick_Button1() -- Copies contents of Sle1 into Sle2 setText(Sle2,getText(Sle1)) end procedure procedure onClick_Button2() -- Copies contents of Sle2 into Sle1 setText(Sle1,getText(Sle2)) end procedure onClick[ Button1 ] =3D routine_id("onClick_Button1") onClick[ Button2 ] =3D routine_id("onClick_Button2") WinMain( Win ) -- end slebug.exw -- I don't know if it's a problem with my program, with Win32Lib, with Windows or with my computer; I really have no idea about what's happening. My computer is a PII-233 running Win95, and I am using Euphoria 2.0 (but I tested with 2.1 too) and Win32Lib 0.15c. Does anyone know what the problem is, and how to solve it? Regards, Davi Figueiredo davitf at usa.net ____________________________________________________________________ Get free e-mail and a permanent address at http://www.amexmail.com/?A=3D1=