I am working on my first wxPython project, and I have two questions that
google could not answer.
1) I am using wxPython 2.3.3.1 (I installed the binary rpm), and
according to the Changelog wxLocale is part of this distribution.
Could anybody please give me a very small sample of how to use this?
What I specifically want, at the moment, is translate the values of
the calendar control to Dutch (so instead of 'Monday' it should say
'maandag', etc.). I do not (yet) need to translate my own messages.
2) I used to program in Delphi, and I really liked the date-time-picker
control. It is often used in Windows applications. It is a combo box,
if you click on it a small calendar for a specific month appears and
with < and > buttons you can walk through the months. This lets
users very easily pick a date, without popping up a new window.
Now, I know it is a long shot, but I figured I could always ask. Is
there a (simple) way to make the wxCalendarCtrl or the wxPython
calendar behave in such a way?
I am working on my first wxPython project, and I have two questions that
google could not answer.
1) I am using wxPython 2.3.3.1 (I installed the binary rpm), and
according to the Changelog wxLocale is part of this distribution.
Could anybody please give me a very small sample of how to use this?
What I specifically want, at the moment, is translate the values of
the calendar control to Dutch (so instead of 'Monday' it should say
'maandag', etc.). I do not (yet) need to translate my own messages.
Sorry, the only thing I know about wxLocale and etc. is what is in the docs about it. On the other hand, I think that once the locale is set that wxCalendarCtrl (and other string used internally in wxWindows) should automatically use the translated text.
2) I used to program in Delphi, and I really liked the date-time-picker
control. It is often used in Windows applications. It is a combo box,
if you click on it a small calendar for a specific month appears and
with < and > buttons you can walk through the months. This lets
users very easily pick a date, without popping up a new window.
Now, I know it is a long shot, but I figured I could always ask. Is
there a (simple) way to make the wxCalendarCtrl or the wxPython
calendar behave in such a way?
You could probably make something similar with a wxTextCtrl, a wxBitmapButton made to look like the combobox button, and a wxCalendarCtrl on a wxPopupTransientWindow.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
> What I specifically want, at the moment, is translate the values of
> the calendar control to Dutch (so instead of 'Monday' it should say
> 'maandag', etc.). I do not (yet) need to translate my own messages.
Sorry, the only thing I know about wxLocale and etc. is what is in the
docs about it. On the other hand, I think that once the locale is set
that wxCalendarCtrl (and other string used internally in wxWindows)
should automatically use the translated text.
Thanks (also to Attila), locale.setlocale(locale.LC_ALL,"") works! It
must look stupid that I had not even thought about that, that even
though the python module reference is almost permanantly open in a
browser tab, I had never even seen the module...
>2) I used to program in Delphi, and I really liked the date-time-picker
> control. It is often used in Windows applications. It is a combo box,
> if you click on it a small calendar for a specific month appears and
> with < and > buttons you can walk through the months. This lets
> users very easily pick a date, without popping up a new window.
>
> Now, I know it is a long shot, but I figured I could always ask. Is
> there a (simple) way to make the wxCalendarCtrl or the wxPython
> calendar behave in such a way?
You could probably make something similar with a wxTextCtrl, a
wxBitmapButton made to look like the combobox button, and a
wxCalendarCtrl on a wxPopupTransientWindow.
I guess it's not so strange since almost all books
about Python are written by people whose native
language is English...
···
At 14:02 2002-11-11 +0100, you wrote:
Thanks (also to Attila), locale.setlocale(locale.LC_ALL,"") works! It
must look stupid that I had not even thought about that, that even
though the python module reference is almost permanantly open in a
browser tab, I had never even seen the module...