Sub GetUserDataLogin As Boolean
Dim cd As CustomDialog
Dim pnl As Panel
pnl.Initialize("pnl")
pnl.Color = ColorQubalGrey
Dim Usr_Txt As EditText
Usr_Txt.Initialize("")
Usr_Txt.InputType = Usr_Txt.INPUT_TYPE_Text
Dim PW_Txt As EditText
PW_Txt.Initialize("")
PW_Txt.PasswordMode =True
Dim Usr_Lbl As Label
Usr_Lbl.Initialize("")
Usr_Lbl.Color = ColorQubalGrey
Usr_Lbl.TextColor = ColorQubalRed
Usr_Lbl.Gravity = Gravity.CENTER_VERTICAL
Usr_Lbl.TextSize = 14
Usr_Lbl.Text = "Benutzername:"
Dim PW_Lbl As Label
PW_Lbl.Initialize("")
PW_Lbl.Color = ColorQubalGrey
PW_Lbl.TextColor = ColorQubalRed
PW_Lbl.Gravity = Gravity.CENTER_VERTICAL
PW_Lbl.TextSize = 14
PW_Lbl.Text = "Passwort:"
pnl.AddView(Usr_Lbl, 10dip, 10dip, 120dip, 60dip)
pnl.AddView(Usr_Txt, 135dip, 10dip, 120dip, 60dip)
pnl.AddView(PW_Lbl, 10dip, 80dip, 200dip, 60dip)
pnl.AddView(PW_Txt, 135dip, 80dip, 120dip, 60dip)
cd.AddView(pnl, 0%x, 0%y, 300, 70%y) ' sizing relative to the screen size is probably best
ret = cd.Show(AppName, "OK", "Abbrechen", "", Null)
If ret = -1 Then
UserName = Usr_Txt.Text.Trim
UserPW = PW_Txt.Text.Trim
If UserName.Length > 0 AND UserPW.Length > 0 Then
SendHTTPqubalRequest(1, qubal.CmdGetUserData)
Else
GetUserDataLogin
End If
Else
ExitApplication
End If
End Sub