This custom view is cross-platform, works for B4A, B4J and should work also for B4I.
UPDATE: V. 2.00 09/15/2025
Added: ActAsCountDown. As the property name suggests, you can now use it as both a countdown timer and an elapsed time counter.
It is a time counter or "elapsed time" (v. 2 - also countdown timer).
You can:
decide whether to display the milliseconds / hours numbers or not;
change the colors;
border and corners;
pause and resume.
UPDATE: V. 1.10
Added two properties and two methods to start counting with an initial value (methods) or to set the initial value (properties).
You should thank @Sagenut for these new features.
PROPERTIES:
METHODS:
EVENTS:
BTW, used for a (famous) little game created for testing (to test ChatGPT capabilities).
UPDATE: V. 2.00 09/15/2025
Added: ActAsCountDown. As the property name suggests, you can now use it as both a countdown timer and an elapsed time counter.
It is a time counter or "elapsed time" (v. 2 - also countdown timer).
You can:
decide whether to display the milliseconds / hours numbers or not;
change the colors;
border and corners;
pause and resume.
UPDATE: V. 1.10
Added two properties and two methods to start counting with an initial value (methods) or to set the initial value (properties).
You should thank @Sagenut for these new features.
PROPERTIES:
- ActOnClick (*)
- BGColor - Background color
- BorderColor
- BorderWidth
- ElapsedTime
- ElapsedTimeString
- CounterByString V. 1.10
- CounterByLong V. 1.10
- CornerRadius
- FontSize
- LabelFont
- Paused
- ShowMilliseconds
- ShowHours
METHODS:
- StartCounter
- StartCounterFromString V. 1.10
- CounterFromLong V. 1.10
- StopCounter
- PauseCounter
- ResumeCounter
EVENTS:
- Click
- ElapsedTimeChanged
- StateChanged
BTW, used for a (famous) little game created for testing (to test ChatGPT capabilities).
Attachments
Last edited: