B4X Store

ELEVATEUI · B4A · XUI

UITimePicker

Collect a time value without forcing manual text parsing.

78 modules 1,780 APIs

Inputs & forms

What it solves

Collect a time value without forcing manual text parsing.

Animated conceptual demonstration, not an exact Android control screenshot.

9 methods5 Designer1 events

When to use this module

In a data-entry form, connect the chosen value to validation and the action that submits the form.

Before integrating, examine its methods, events and Designer options.

B4A integration examples

Tutorials are based on existing project examples or audited APIs. Check each example’s prerequisites; B4A compilation is not claimed.

Practical tutorial awaiting verification

The public API, events and properties remain available. An isolated initialization is not presented as a full example; a tutorial will be added after a functional sequence is documented.

Public methods reference

9 audited signatures

Public Sub Initialize(Callback As Object, EventName As String)

Prepare the instance before its other methods.

Original catalog note: Initializes the scroll wheel time picker

Callback As ObjectEventName As String
Public Sub DesignerCreateView (Base As Object, Lbl As Label, Props As Map)

Invoked automatically by the B4A Visual Designer; do not call manually.

Original catalog note: DesignerCreateView method to initialize B4A UI designer layout properties

Base As ObjectLbl As LabelProps As Map
Public Sub AddToParent(Parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)

Add this view to a parent container using the supplied bounds and options.

Original catalog note: Adds the time picker control to a parent view container programmatically

Parent As B4XViewLeft As IntTop As IntWidth As IntHeight As Int
Public Sub Set24HourMode(Enabled As Boolean)

Use Set24HourMode for its named operation; follow its exact signature.

Original catalog note: Configure whether 24-Hour mode or 12-Hour AM/PM mode is used

Enabled As Boolean
Public Sub SetShowSeconds(Show As Boolean)

Use SetShowSeconds for its named operation; follow its exact signature.

Original catalog note: Configure whether seconds column is shown in 24-hour mode

Show As Boolean
Public Sub SetColors(BgColor As Int, TextColor As Int, AccentColor As Int)

Use SetColors for its named operation; follow its exact signature.

Original catalog note: Set styling colors

BgColor As IntTextColor As IntAccentColor As Int
Public Sub SetTime(Hours As Int, Minutes As Int, Seconds As Int, Period As String)

Use SetTime for its named operation; follow its exact signature.

Hours As IntMinutes As IntSeconds As IntPeriod As String
Public Sub GetTime As String

Use GetTime for its named operation; follow its exact signature.

Returns: String

Public Sub Stop

Use Stop for its named operation; follow its exact signature.

Original catalog note: Stop scroll-position monitoring when the picker is removed from the screen.

Designer · 5

#DesignerProperty: Key: 24HourMode, DisplayName: 24-Hour Mode, FieldType: Boolean, DefaultValue: True, Description: Use 24-Hour mode or 12-Hour AM/PM mode#DesignerProperty: Key: ShowSeconds, DisplayName: Show Seconds, FieldType: Boolean, DefaultValue: True, Description: Show seconds column in 24-hour mode#DesignerProperty: Key: BackgroundColor, DisplayName: Background Color, FieldType: Color, DefaultValue: 0xFFFFFFFF, Description: Selector background color#DesignerProperty: Key: TextColor, DisplayName: Text Color, FieldType: Color, DefaultValue: 0xFF1F2937, Description: Inactive text color#DesignerProperty: Key: SelectedTextColor, DisplayName: Selected Text Color, FieldType: Color, DefaultValue: 0xFF1E78FF, Description: Highlighted selection color

Public events and how to implement them · 1

Initialize with Me and the event prefix Demo, then add the following handler to your B4A module. Names and arguments come from the library declaration.

TimeChanged(TimeData As UITime)

Raised when a selection or value changes; use it to update dependent data.

B4A handler signature with Demo prefix

Private Sub Demo_TimeChanged(TimeData As UITime)
    Log("TimeChanged")
End Sub

For code-created controls use Initialize(Me, "Demo") when that signature exists; for Designer controls set the event name there. Replace Demo with the actual prefix.

Public fields, constants and types

Public mBase As B4XView
Source: ElevateUI public API catalog; tutorials cross-checked against ElevateUI(6).b4xlib. Visualizations are illustrative; sample code requires B4A compilation.