csMsgText.Initialize.Typeface(fntMsgMono)
csMsgText.Append("Confirm that the ").Bold.Color(HiLitePwr).Append(strPower).Pop
csMsgText.Append(" Power is to take control of the territory ")
csMsgText.Bold.Color(HiLiteTerr).Append(Territory.Name).PopAll
Dialog.PutAtTop = True
tmpLongText.mBase.Width = 360dip
tmpLongText.CustomListView1.Base_Resize(356dip, 200dip)
tmpLongText.Text = csMsgText
iLen = csMsgText.Length
Log(iLen)
If iLen < 81 Then
tmpLongText.mBase.Height = 90dip
Else If iLen >= 81 And iLen <= 107 Then
tmpLongText.mBase.Height = 125dip
Else If iLen > 107 Then
tmpLongText.mBase.Height = 150dip
End If
Dim rsp As ResumableSub = Dialog.ShowTemplate(tmpLongText, "Yes", "No", "")
Dim btnYes As B4XView = Dialog.GetButton(xui.DialogResponse_Positive)
btnYes.SetBitmap(bmpBtnUp)
Dim btnNo As B4XView = Dialog.GetButton(xui.DialogResponse_Negative)
btnNo.SetBitmap(bmpBtnUp)
Wait For (rsp) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
...
End If