Sub btnSearch_Click
Dim rs As ResumableSub = Dialog.ShowTemplate(SearchTemplate, "", "", "CANCEL")
Wait For (rs) Complete (Result As Int)
If Result = XUI.DialogResponse_Positive Then
Dim MySelection As String = SearchTemplate.SelectedItem
wait for (Dialog.Show($"You selected: ${MySelection}"$, "OK", "", "Cancel")) Complete ( res As Int)
If res = XUI.DialogResponse_Cancel Then
MySelection=""
btnSearch_Click
End If
btnSearch.xLBL.Text =MySelection
Log($"myselection is: ${MySelection}"$)
End If
End Sub