When the dialog appears, I want to highlight the second item with different text color and/or background color, Unfortunately the following code doesn't work for me. Could someone kindly show me how to achieve that, please?
Unable to highlight the preselected item:
Dim options As B4XListTemplate
options.Initialize
options.Options = Array("Cat", "Dog", "Fish", "Crocodile")
options.SelectedItem="Dog" '<==preselect second item
options.SelectionColor=xui.Color_Magenta 'show it in different color
Wait For (Dialog.ShowTemplate(options, "OK", "", "CANCEL")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
Dialog.Show($"You selected: ${options.SelectedItem}"$, "OK", "", "")
End If