wx.lib.calendar.CalenDlg,how to set the years range?

Hi,
I'm using the widget in object and I've a problem.
I've notice that the lower value of the years is 1980.
How can I set this value to 1900?
I try this but it doesn't work.

self.dlg = wx.lib.calendar.CalenDlg(self)
#self.dlg.SetRange(1970, 2010) dont' work!
What is the attribute name of the years?

gretting

Giuseppe Costanzi wrote:

Hi,
I'm using the widget in object and I've a problem.
I've notice that the lower value of the years is 1980.
How can I set this value to 1900?
I try this but it doesn't work.

self.dlg = wx.lib.calendar.CalenDlg(self)
#self.dlg.SetRange(1970, 2010) dont' work!
What is the attribute name of the years?

"Use the Source Luke!" A 15 second peep at the CalenDlg class would reveal this:

         self.y_spin = wx.SpinButton(self, -1, (225, 20), (h*1.5, h), wx.SP_VERTICAL)
         self.y_spin.SetRange(1980, 2010)
         self.y_spin.SetValue(start_year)

···

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

Robin Dunn ha scritto:

Giuseppe Costanzi wrote:

Hi,
I'm using the widget in object and I've a problem.
I've notice that the lower value of the years is 1980.
How can I set this value to 1900?
I try this but it doesn't work.

self.dlg = wx.lib.calendar.CalenDlg(self)
#self.dlg.SetRange(1970, 2010) dont' work!
What is the attribute name of the years?

"Use the Source Luke!" A 15 second peep at the CalenDlg class would reveal this:

        self.y_spin = wx.SpinButton(self, -1, (225, 20), (h*1.5, h), wx.SP_VERTICAL)
        self.y_spin.SetRange(1980, 2010)
        self.y_spin.SetValue(start_year)

Ok Obi-Wan Kenobi I try to use the source but the dark side of this its stronger
If I change
self.y_spin.SetRange(1980, 2010)
with
self.y_spin.SetRange(1900, 2010)
It work but only on the calendar on the frame.
I'm using this
wx.lib.calendar.CalenDlg(self)
not
wx.lib.calendar.Calendar(self, -1, (100, 50), (200, 180))
In the calendar.py file demo if I make the change it work on the calendar on the frame
not in the dialog calendar.
My scenario is that, I have a frame with some widgets and one of thi is use to write a birth date.
When the user click on this widget...
self.txBirthDate.Bind(wx.EVT_LEFT_DOWN, self.OnSelectData)
The event is...
  def OnSelectData(self,event):
        global sDay,sMonth,sYear
        dlg = wx.lib.calendar.CalenDlg(self)
Again on a caledar in a dialog how can I set the years range?
What I don't understand?
P.S.
In the head of the script i write
import wx.lib.calendar
Ciao!

Giuseppe Costanzi wrote:

Robin Dunn ha scritto:

Giuseppe Costanzi wrote:

Hi,
I'm using the widget in object and I've a problem.
I've notice that the lower value of the years is 1980.
How can I set this value to 1900?
I try this but it doesn't work.

self.dlg = wx.lib.calendar.CalenDlg(self)
#self.dlg.SetRange(1970, 2010) dont' work!
What is the attribute name of the years?

"Use the Source Luke!" A 15 second peep at the CalenDlg class would reveal this:

        self.y_spin = wx.SpinButton(self, -1, (225, 20), (h*1.5, h), wx.SP_VERTICAL)
        self.y_spin.SetRange(1980, 2010)
        self.y_spin.SetValue(start_year)

Ok Obi-Wan Kenobi I try to use the source but the dark side of this its stronger
If I change
self.y_spin.SetRange(1980, 2010)
with
self.y_spin.SetRange(1900, 2010)
It work but only on the calendar on the frame.
I'm using this
wx.lib.calendar.CalenDlg(self)
not
wx.lib.calendar.Calendar(self, -1, (100, 50), (200, 180))
In the calendar.py file demo if I make the change it work on the calendar on the frame
not in the dialog calendar.

Have patience my padawan learner, read further in the module and grok the CalenDlg class. Observe this PyShell session:

  >>> import wx
  >>> import wx.lib.calendar as c
  >>> d = c.CalenDlg(shell)
  >>> d.y_spin.SetRange(1900, 2010)
  >>> d.ShowModal()
  5100
  >>> d.Destroy()
  True

···

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

Robin Dunn ha scritto:

Giuseppe Costanzi wrote:

Robin Dunn ha scritto:

Giuseppe Costanzi wrote:

Hi,
I'm using the widget in object and I've a problem.
I've notice that the lower value of the years is 1980.
How can I set this value to 1900?
I try this but it doesn't work.

self.dlg = wx.lib.calendar.CalenDlg(self)
#self.dlg.SetRange(1970, 2010) dont' work!
What is the attribute name of the years?

"Use the Source Luke!" A 15 second peep at the CalenDlg class would reveal this:

        self.y_spin = wx.SpinButton(self, -1, (225, 20), (h*1.5, h), wx.SP_VERTICAL)
        self.y_spin.SetRange(1980, 2010)
        self.y_spin.SetValue(start_year)

Ok Obi-Wan Kenobi I try to use the source but the dark side of this its stronger
If I change
self.y_spin.SetRange(1980, 2010)
with
self.y_spin.SetRange(1900, 2010)
It work but only on the calendar on the frame.
I'm using this
wx.lib.calendar.CalenDlg(self)
not
wx.lib.calendar.Calendar(self, -1, (100, 50), (200, 180))
In the calendar.py file demo if I make the change it work on the calendar on the frame
not in the dialog calendar.

Have patience my padawan learner, read further in the module and grok the CalenDlg class. Observe this PyShell session:

>>> import wx
>>> import wx.lib.calendar as c
>>> d = c.CalenDlg(shell)
>>> d.y_spin.SetRange(1900, 2010)
>>> d.ShowModal()
5100
>>> d.Destroy()
True
>>>

Thank you Master,this is what I was looking for...you know that the path of a jedi is often difficult ,filled with conflict and pain...