I would like to have a leading zero in the spin bounce so that two digits are always displayed.
adj_hour = gtk.Adjustment(int(time.strftime("%H")),0,24,1,1)
entry_hour = gtk.SpinButton()
entry_hour.set_adjustment(adj_hour)
the problem is that gtk. The first argument to configure is float / int.
I tried things like:
adj_hour = gtk.Adjustment(float(format(int(time.strftime("%H")), '02d')),0,24,1,1)
but that will not work.
source
share