EditText Style: ES_NUMERIC
- Posted by jordah at btopenworld.com Jan 28, 2003
- 480 views
Hi, I've been coding an App using win32lib but i noticed something was wrong. If i use ES_NUMERIC i no longer get the "Number only sle". it allows other characters as well. I'm using XP. Its probably the bit-flags in wrong order or XP issue(which i doubt). I could probably fix this with SetWindowLong() but its not worth it if some one else knows why. Jordah -- example7.exw -- -- This creates two editable controls, -- and buttons to query their control's values include win32lib.ew without warning with trace constant Win = create( Window, "Get Data", 0, Default, Default, 400, 200, 0 ), Check1 = create( CheckBox, "checkbox", Win, 10, 10, 80, 20, 0 ), Button1 = create( PushButton, "Check Value...", Win, 180, 10, 120, 20, 0 ), Sle1 = create( EditText, "", Win, 10, 40, 120, 20, ES_NUMERIC ), Button2 = create( PushButton, "Check Value...", Win, 180, 40, 120, 20, 0 ) constant aStatusBar = create( StatusBar, "", Win, 0, 25, 20, 20, 0) procedure Click_Button(integer self, integer event, sequence parms) sequence msg if self = Button1 then if isChecked( Check1 ) then msg = "Checked: Yes" else msg = "Checked: No" end if else msg = getText(Sle1) end if setText(aStatusBar, msg) end procedure setHandler({Button1, Button2}, w32HClick, routine_id("Click_Button")) WinMain( Win, Normal ) ---