Set dd/mm/yyyy format to wx.DatePickerCtrl?

Sorry, I don’t really understand
your idea, I played around with the wx.Locale class and did not find anything
interesting that fits my need.

Best regards,

Tai Tran

···

From:
wxpython-users-bounces+tttai=tma.com.vn@lists.wxwidgets.org
[mailto:wxpython-users-bounces+tttai=tma.com.vn@lists.wxwidgets.org] On Behalf Of Marc Tompkins
Sent: Tuesday, March 25, 2008
10:59 AM
To: wxpython-users@lists.wxwidgets.org
Subject: Re: [wxpython-users] Set
dd/mm/yyyy format to wx.DatePickerCtrl?

On Mon, Mar 24, 2008 at 8:41 PM, Tai Tran Tan tttai@tma.com.vn wrote:

Thanks for your suggestion!

SetFormat() function is not available to wxPython, I’ve tried this but it
simply did not work at all

From my reading of that passage, you might be able to mess with the
Python “locale” module to do what you want to do. (In other
words, play with the system’s internationalization on a “sandbox”
basis without affecting anybody else.)

I’d try it out before shooting my mouth off, but I’m only checking my email
while I wait for my $%^&* slow system to transcode a video…

Please
note that this function is only available in the generic version of this
control. The native version always uses the current system locale.

www.fsrtechnologies.com

I met with the same problem, and didn’t find any solution working on wx.DatePickerCtrl or the locale. My workaround is to build a wx.TextCtrl (read-only) with the same size and position of the wx.DatePickerCtrl. The wx.TextCtrl shows only when the wx.DatePickerCtrl loses focus, and its internal code translates the value of the wx.DatePickerCtrl to the format you desire. Then a double click to the wx.TextCtrl hides it and renders the focus to the wx.DatePickerCtrl. You might use also a wx.StaticText, but this one does not allow to copy its value with Ctrl-c.

···

2008/3/25, Tai Tran Tan tttai@tma.com.vn:

Sorry, I don’t really understand
your idea, I played around with the wx.Locale class and did not find anything
interesting that fits my need.

Best regards,

Tai Tran


From:
wxpython-users-bounces+tttai=tma.com.vn@lists.wxwidgets.org
[mailto:wxpython-users-bounces+tttai=tma.com.vn@lists.wxwidgets.org] On Behalf Of Marc Tompkins
Sent: Tuesday, March 25, 2008
10:59 AM
To: wxpython-users@lists.wxwidgets.org
Subject: Re: [wxpython-users] Set
dd/mm/yyyy format to wx.DatePickerCtrl?

On Mon, Mar 24, 2008 at 8:41 PM, Tai Tran Tan tttai@tma.com.vn wrote:

Thanks for your suggestion!

SetFormat() function is not available to wxPython, I’ve tried this but it
simply did not work at all

From my reading of that passage, you might be able to mess with the
Python “locale” module to do what you want to do. (In other
words, play with the system’s internationalization on a “sandbox”
basis without affecting anybody else.)

I’d try it out before shooting my mouth off, but I’m only checking my email
while I wait for my $%^&* slow system to transcode a video…

Please
note that this function is only available in the generic version of this
control. The native version always uses the current system locale.

www.fsrtechnologies.com


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users