I'm trying to make TextCtrl convert all entry to uppercase:
event.KeyCode = ord(chr(event.KeyCode).upper())
after this event.KeyCode contains the KeyCode for the uppercase char
but the TextCtrl still processes the lowercase char (for a lowercase entry)
I noticed that event.GetKeyEvent() never returns then uppercase char.
I looked for event. SetKeyCode() but it doesn't exist,
Is there any way to do this?
I use '&Label' on my buttons but the underscored 'L' does not appear, Is this a bug?
I use python 2.3b1, wxPython 2.4.0.7, and Boa Constructor 0.2.3
I've been having lots of little problems like this, so my employer asked me to look for other programming tools.
I like python, a firiend told me to look at blackadder with qt, Would it be worth the try?
I'm trying to make TextCtrl convert all entry to uppercase:
event.KeyCode = ord(chr(event.KeyCode).upper())
after this event.KeyCode contains the KeyCode for the uppercase char
but the TextCtrl still processes the lowercase char (for a lowercase entry)
I noticed that event.GetKeyEvent() never returns then uppercase char.
The key events are there to inform you of the keys but they don't support chaning the values, they are one-way only. (fundamentally because the native widgets have no understanding of wxKeyEvent).
You can however put whatever value you want into the control at any time you want, so use the event as notification and do something like this:
textCtrl.SetValue(textCtrl.GetValue().upper())
You may also want to look at wxValidators as well as the new MaskedEditControl that will
I looked for event. SetKeyCode() but it doesn't exist,
Is there any way to do this?
I use '&Label' on my buttons but the underscored 'L' does not appear, Is this a bug?
I use python 2.3b1, wxPython 2.4.0.7, and Boa Constructor 0.2.3
Which platform?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I'm trying to make TextCtrl convert all entry to uppercase:
event.KeyCode = ord(chr(event.KeyCode).upper())
after this event.KeyCode contains the KeyCode for the uppercase char
but the TextCtrl still processes the lowercase char (for a lowercase entry)
I noticed that event.GetKeyEvent() never returns then uppercase char.
The key events are there to inform you of the keys but they don't support chaning the values, they are one-way only. (fundamentally because the native widgets have no understanding of wxKeyEvent).
You can however put whatever value you want into the control at any time you want, so use the event as notification and do something like this:
textCtrl.SetValue(textCtrl.GetValue().upper())
You may also want to look at wxValidators as well as the new MaskedEditControl that will
I looked for event. SetKeyCode() but it doesn't exist,
Is there any way to do this?
I use '&Label' on my buttons but the underscored 'L' does not appear, Is this a bug?
I use python 2.3b1, wxPython 2.4.0.7, and Boa Constructor 0.2.3
Which platform?
Missed it again, winXP. I tried later on win98 and it seems to work fine.
I use '&Label' on my buttons but the underscored 'L' does not appear, Is this a bug?
I use python 2.3b1, wxPython 2.4.0.7, and Boa Constructor 0.2.3
Which platform?
Missed it again, winXP. I tried later on win98 and it seems to work fine.
Win2k (and XP I assume) have a setting that specifies whether the underscore should always be displayed or not. If not then it should show up when the Alt key is pressed, however there was a bug (and it could still be there) in how wxWindows is processing the keyboard messages that prevented that feature of Windows from working correctly. One way around it is to change your settings to always display the underscores...
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I use '&Label' on my buttons but the underscored 'L' does not appear, Is this a bug?
I use python 2.3b1, wxPython 2.4.0.7, and Boa Constructor 0.2.3
Which platform?
Missed it again, winXP. I tried later on win98 and it seems to work fine.
Win2k (and XP I assume) have a setting that specifies whether the underscore should always be displayed or not. If not then it should show up when the Alt key is pressed, however there was a bug (and it could still be there) in how wxWindows is processing the keyboard messages that prevented that feature of Windows from working correctly. One way around it is to change your settings to always display the underscores...
It seems the bug is still there, I searched the setting you mentioned and didn't find it. I guess I'll have to live with it until they fix it. Anyway, your answer sure saved me a lot of time.