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

Hi Raffaello,

It’s great on WinXP, I did not test
on other platforms yet, but I think it will be OK too. From your idea, I’m
trying to make the same thing using the popup control of wxPython and it seems
to be very promising. I’ll send you my source code if I can make it that
way.

Sorry for my late reply. I’ve been
busy myself recently.

Thanks,

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 Raffaello Barella
Sent: Friday, March 28, 2008 11:46
PM
To: wxpython-users@lists.wxwidgets.org
Subject: Re: [wxpython-users] Set
dd/mm/yyyy format to wx.DatePickerCtrl?

Hi, Tai Tran Tan.

With a little spare time, I cooked up a
«rbDatePickerCtrl», that has a SetFormat() method properly running.
If you like it, you can put it in your library of custom controls.

You’ll see that I am far from having covered all possible
date formats: I shall gladly welcome additions, amendments and -obviously- bug
reports, wherever they come from.

2008/3/27, Raffaello Barella barbarossa.platz@gmail.com:

Don’t mention it.

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

Your solution could work, I’ll try it. Thanks!

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 Raffaello Barella
Sent: Tuesday, March 25, 2008 4:42
PM
To: wxpython-users@lists.wxwidgets.org
Subject: Re: [wxpython-users] Set
dd/mm/yyyy format to wx.DatePickerCtrl?

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


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

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