469,271 Members | 1,110 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

Validators and wxPython

Hi there,
I have a little problem. If I put a validator in a wxTextCtrl, If you enter text, the background color changes to an awful grey color, what can I do for this not to happen?
Jan 26 '07 #1
5 1852
Motoma
3,237 Expert 2GB
Hi there,
I have a little problem. If I put a validator in a wxTextCtrl, If you enter text, the background color changes to an awful grey color, what can I do for this not to happen?
Have you explicitly set the default style for the wxTextCtrl?
Jan 26 '07 #2
Have you explicitly set the default style for the wxTextCtrl?
No
If you say
Expand|Select|Wrap|Line Numbers
  1.  
  2. txtctrl = wx.TextCtrl(self,
  3.             -1,"", name = "atext" 
  4.             validator = Validator.Validator(Validator.s+ Validator.o, maxcount=4))
  5. txtctrl.SetBackgroundColour(wx.WHITE)
  6.  
then it still does that, am I missing something?
Jan 26 '07 #3
bartonc
6,596 Expert 4TB
Hi there,
I have a little problem. If I put a validator in a wxTextCtrl, If you enter text, the background color changes to an awful grey color, what can I do for this not to happen?
I haven't played with validators yet, but have a need to do so soon. Is this your fedora or windows install? Is there a difference?
Jan 28 '07 #4
I haven't played with validators yet, but have a need to do so soon. Is this your fedora or windows install? Is there a difference?
It is in Fedora,
I haven't had much experience in Windows with Validators.
It is really annoying, it gives the impression that it is disabled.
This problem may sound stupid, but a lot of not-so-smart people may need to see the app, and then they get confused
Feb 5 '07 #5
bartonc
6,596 Expert 4TB
It is in Fedora,
I haven't had much experience in Windows with Validators.
It is really annoying, it gives the impression that it is disabled.
This problem may sound stupid, but a lot of not-so-smart people may need to see the app, and then they get confused
I think that the easiest way to track down things like this is to make a simpleApp with just enough stuff in it to reproduce your problem. That way you can post it here and I can run it under windows or you can take it to your other machine by any convenient means in order to compare the two installations. I have seen that many times, in making the simpleApp, you will discover something in the larger app that is causing the odd behaviour. Or you will find that this situation arises from version/installation problems. I highly recommend that you make sure you are using current versions of wx (2.8.0 minimum).
Feb 5 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by timothy.williams | last post: by
1 post views Thread by Tom Pearson | last post: by
reply views Thread by Tom Pearson | last post: by
6 posts views Thread by Mark | last post: by
3 posts views Thread by John Blair | last post: by
1 post views Thread by epigram | last post: by
1 post views Thread by Gabriel Lozano-Morán | last post: by
2 posts views Thread by Mike Surcouf | last post: by
reply views Thread by Robin Dunn | last post: by
4 posts views Thread by Madhur | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.