Hi,
I have a customdialog with a add button.
My problem is when I press the button I would like to validate some data before leaving the dialogbox. Is this possible
Now I am reload the sub, but that reset my text fields.
Thanks
My code for now is:
Mogens
I have a customdialog with a add button.
My problem is when I press the button I would like to validate some data before leaving the dialogbox. Is this possible
Now I am reload the sub, but that reset my text fields.
Thanks
My code for now is:
B4X:
Dim dialog As CustomDialog
Dim pnl As Panel
Dim Subscription As String
pnl.Initialize("")
pnl.LoadLayout("inputdialog")
InputDialogEditTextSubscription.InputType = InputDialogEditTextSubscription.INPUT_TYPE_PHONE
dialog.AddView(pnl, 0dip, 0dip, 100%x, 240dip)
dialog.Show("Tilføj profil", "Tilføj", "Annuller", "", LoadBitmap(File.DirAssets, "ic_menu_car.png"))
If dialog.Response = -1 Then
If InputDialogEditTextProfileName.Text.Length > 0 AND InputDialogEditTextSubscription.Text.Length > 0 Then
If InputDialogButtonButtonSubscription.Checked = True Then Subscription = "True"
If InputDialogButtonButtonNoSubscription.Checked = True Then Subscription = "False"
AddProfileToSql(InputDialogEditTextProfileName.Text, Subscription, InputDialogEditTextSubscription.Text)
ViewProfiles
Else
AddProfile
End If
End If
If dialog.Response = -2 Then
ViewProfiles
End If
Mogens