Problem with DatePickerCtrl

Hi all!

I have created a DatePickerCtrl and bind wx.EVT_DATE_CHANGED event
handler to it as:

self.dc_ret_date = wx.DatePickerCtrl(self, size=(120,-1),
style=wx.DP_DEFAULT | wx.DP_SHOWCENTURY)
self.Bind(wx.EVT_DATE_CHANGED, self.OnReturnDateChange, self.dc_ret_date)

1.When I one-click a date in the popup window I get two wxDateEvent
events - it looks like i get event for mouse down and up. When I
duble-click a date I get three wxDateEvent events. Is there a way to get
a wxDateEvent only when i double click the date?

2.How can I close DatePicker popup window - sometimes it closes by it
self on double click, but sometimes it stays open until I click some
other control. I tried self.dc_ret_date.Hide() but that (daahh) hid
everything.

I am using 2.8 wxPython GTK on linux (the one that come with ubuntu 7.10).

Regards Simon

Simon Posnjak wrote:

Hi all!

I have created a DatePickerCtrl and bind wx.EVT_DATE_CHANGED event
handler to it as:

self.dc_ret_date = wx.DatePickerCtrl(self, size=(120,-1),
style=wx.DP_DEFAULT | wx.DP_SHOWCENTURY)
self.Bind(wx.EVT_DATE_CHANGED, self.OnReturnDateChange, self.dc_ret_date)

1.When I one-click a date in the popup window I get two wxDateEvent
events - it looks like i get event for mouse down and up. When I
duble-click a date I get three wxDateEvent events. Is there a way to get
a wxDateEvent only when i double click the date?

2.How can I close DatePicker popup window - sometimes it closes by it
self on double click, but sometimes it stays open until I click some
other control. I tried self.dc_ret_date.Hide() but that (daahh) hid
everything.

I am using 2.8 wxPython GTK on linux (the one that come with ubuntu 7.10).

Please create a "wxGTK Specific" bug report about this.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!