(moved to dabo-users)
johnf wrote:
> Hi.
> How do I prevent the user from typing a char in a textbox?
> keyChar = evt.keyChar
> if keyChar in """,./<>?;':"[]\\{}|[EMAIL PROTECTED]&*()-_=+""":
> need to do something here to lose the key stroke.
Try running this sample, I think you'll like it!
#-- begin sample
import dabo
app = dabo.dApp()
app.setup()
def onKeyChar(evt):
if evt.keyChar in "dabo123":
evt.stop()
print evt.keyChar
txt = dabo.ui.dTextBox(app.MainForm, OnKeyChar=onKeyChar)
txt.setFocus()
app.start()
##- end sample
--
pkm ~ http://paulmcnett.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users