Reputation: 1663
I would like to insert in my program a spin button to change a time interval. In particular, it should visualize a time in the format hh:mm:ss
and the spin button should increase/decrease of one second the time inverval.
How can I achieve this?
Upvotes: 2
Views: 282
Reputation: 1126
Use the "output" signal of GtkSpinButton [1]. This allows a hook for setting the underlying GtkEntry text when the value changes. The docs already provide a good example so I will leave that out of my answer. Similarly if you accept user input in the same format, the "input" signal can be used to parse the custom formatting back into a double.
Upvotes: 3