B4X Store

ELEVATEUI · B4A · XUI

UISelectionPage

Present a list of choices on its own page or selection dialog.

78 modules 1,780 APIs

Navigation & onboarding

What it solves

Present a list of choices on its own page or selection dialog.

Animated conceptual demonstration, not an exact Android control screenshot.

20 methods0 Designer2 events

When to use this module

In a multi-screen application, connect every menu action to a real destination and preserve the active selection.

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.

Option selection page
Existing documentation example dialogs-registry.json Not B4A-compiled

Review required libraries, Designer views and input data before compiling in B4A.

' Ejemplo 12: selector de opciones. Pega en Main.
Private Sub btnSelection_Click
    Dim xui As XUI
    Dim selector As UISelectionPage
    selector.Initialize(Activity, Me, "Choice")
    selector.setHeaderText("Choose a status", Typeface.DEFAULT_BOLD, xui.Color_Black)
    selector.setTextButton("Select")
    selector.setColorButton(0xFF6554D9)
    selector.AddItem("Pending", "pending")
    selector.AddItem("In progress", "working")
    selector.AddItem("Complete", "done")
    selector.Show
End Sub

Private Sub Choice_ButtonClick(Index As Int, Value As String)
    Log("Selected value: " & Value & " at " & Index)
End Sub

Private Sub Choice_ButtonClick2(Index As Int, Name As String)
    Log("Selected label: " & Name)
End Sub

' El proyecto adjunto también demuestra AddItemWithIcon y
' AddItemWithImage. En esos casos debes incluir el recurso de imagen
' en File.DirAssets o inicializar previamente UIIconFont.

Public methods reference

20 audited signatures

Public Sub Initialize(Activity As B4XView, CallBack As Object, Event As String)

Prepare the instance before its other methods.

Original catalog note: Method to initialize the object

Activity As B4XViewCallBack As ObjectEvent As String
Public Sub Show

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

Original catalog note: Method to display the custom view

Public Sub Close

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

Public Sub setHeaderText(Header As String, HeaderTypeface As Typeface, color As Int)

Update header text at runtime when this setting changes.

Original catalog note: Method to set the header text

Header As StringHeaderTypeface As Typefacecolor As Int
Public Sub setTextButton(text As String)

Update text button at runtime when this setting changes.

Original catalog note: Method to set the button text Method to set the button text

text As String
Public Sub setColorButton(Color As Int)

Update color button at runtime when this setting changes.

Original catalog note: Method to set the button color

Color As Int
Public Sub setDialogBackgroundColor(Color As Int)

Update dialog background color at runtime when this setting changes.

Original catalog note: Sets the background color of the complete dialog surface or selection panel. Supply an ARGB color (e.g., 0xFF202536).

Color As Int
Public Sub setDialogBorderColor(Color As Int)

Update dialog border color at runtime when this setting changes.

Original catalog note: Sets the border color for the complete dialog surface. Supply an ARGB color.

Color As Int
Public Sub setDialogBorderWidth(Width As Float)

Update dialog border width at runtime when this setting changes.

Original catalog note: Sets the border stroke width for the complete dialog surface; zero hides the border.

Width As Float
Public Sub setSelectionColor(Color As Int)

Public API declaration; refer to the library behavior for usage details.

Original catalog note: Verified against supplied 2026-11-28 .b4xlib

Color As Int
Public Sub getSelectionColor As Int

Public API declaration; refer to the library behavior for usage details.

Original catalog note: Verified against supplied 2026-11-28 .b4xlib

Returns: Int

Public Sub setButtonElevation(Elevation As Float, color As Int)

Update button elevation at runtime when this setting changes.

Original catalog note: Method to set the button elevation (shadow)

Elevation As Floatcolor As Int
Public Sub AddItem(title As String, itemValue As String, icon As String = "")

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

Original catalog note: Adds a text-only item. The optional icon keeps the previous asset-based call compatible.

title As StringitemValue As Stringicon As String = ""
Public Sub AddItemWithIcon(title As String, itemValue As String, Icon As Char, IconFont As B4XFont, IconColor As Int)

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

Original catalog note: Adds an item with a font icon and its own color.

title As StringitemValue As StringIcon As CharIconFont As B4XFontIconColor As Int
Public Sub AddItemWithImage(title As String, itemValue As String, Dir As String, FileName As String)

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

Original catalog note: Adds an item with an image loaded from the given directory and file name.

title As StringitemValue As StringDir As StringFileName As String
Public Sub setSelectedIndex As Int

Update selected index at runtime when this setting changes.

Original catalog note: Method to get the index of the selected item

Returns: Int

Public Sub setSelectedValue As String

Update selected value at runtime when this setting changes.

Original catalog note: Method to get the value of the selected item

Returns: String

Public Sub setListView As CustomListView

Update list view at runtime when this setting changes.

Original catalog note: Method to get the CustomListView

Returns: CustomListView

Public Sub setSelectedItemByValue(itemValue As String)

Update selected item by value at runtime when this setting changes.

Original catalog note: Method to programmatically select an item

itemValue As String
Public Sub setSelectedItemByText(itemText As String)

Update selected item by text at runtime when this setting changes.

Original catalog note: Method to programmatically select an item by its label text

itemText As String

Designer · 0

No custom Designer properties were found in the audited API.

Public events and how to implement them · 2

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.

ButtonClick (index As Int, value As String)

Raised when the user taps the control; use it to trigger a real action.

B4A handler signature with Demo prefix

Private Sub Demo_ButtonClick(index As Int, value As String)
    Log("ButtonClick")
End Sub
ButtonClick2 (index As Int, Name As String)

Raised when the user taps the control; use it to trigger a real action.

B4A handler signature with Demo prefix

Private Sub Demo_ButtonClick2(index As Int, Name As String)
    Log("ButtonClick2")
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.

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