How to display a leading zeros for number in wx.SpinCtrl?

What’s the best way
to dispay leading zeros for number in wx.SpinCtrl?

  I've created

SpinCtrl:

self.MySpin = wx.SpinCtrl(self, min=1, max=100)
  and i want that

displaying 002, 003… 012 etc when i press up button in this spin

How I can do this?

I don’t think you can do it directly with a SpinCtrl, which is a combination of a TextCtrl and a SpinButton as you have no access to the methods of the TextCtrl part, so you need to create and manage the two components separately.

See timectrl.py in wx.lib.masked where the hours/minutes/[seconds] displays can show leading zeros and are driven by a spin button.

Regards,
David Hughes
Forestfield Software

···

On Friday, July 12, 2013 2:11:07 PM UTC+1, Mind Mixer wrote:

  What's the best way

to dispay leading zeros for number in wx.SpinCtrl?

  I've created

SpinCtrl:

self.MySpin = wx.SpinCtrl(self, min=1, max=100)
  and i want that

displaying 002, 003… 012 etc when i press up button in this spin

How I can do this?