iOS Countdown Picker
From Xojo Documentation
Contents
The iOS Countdown Picker control is used to let the user choose a number of hours and minutes. It is just a picker, not a timer. You'll need to use the Timer control if you need to actually time an action based upon what the user chooses from the Countdown Picker.
Below are common events, properties and methods. Refer to iOSCountdownPicker in the Language Reference for the complete list.
Events
ValueChanged - Called when the user changes the hours or minutes). It's passed a duration variable that tells you to what value the picker is now set.
Properties
CountdownDuration - Specifies the initial duration (in seconds) to display. It is also the currently displayed countdown duration, so use this to get the value the user has picked.
Enabled - A boolean that indicates if the DateTime Picker is enabled and can be used or disabled and cannot be used.
MinuteInterval - The number of minutes to show in the selector. The default is 1.
Usage
If you want to get notified every time the Countdown Picker value is changed, then use the ValueChanged event handler. If you would prefer to get the value at a time of your own choosing, you can refer to the properties.
For example, if you want to have a button that says "Get Selected Duration", then it's Pressed event handler could have code like this:
That same code can also go in the ValueChanged event handler, which means it will be called when the duration changes.
By default the Countdown Picker shows 1 minute. You can also have a different duration as the default by setting the CountdownDuration property. This code in the Opening event handler for the Countdown Picker sets the default duration:
See Also
iOSCountdownPicker class