hi,
I have a Customdialog where I put 2 EditText and 2 radiobuttons .
I would like to enable and disable EditText with radiobuttons. how can I do?
The following code
Thank You
I have a Customdialog where I put 2 EditText and 2 radiobuttons .
I would like to enable and disable EditText with radiobuttons. how can I do?
The following code
Thank You
B4X:
Sub Cerca_Click
Dim cd As CustomDialog
Dim pnl As Panel
Dim check,check1 As RadioButton
Dim testo,testo1 As EditText
testo.Initialize("")
testo1.Initialize("")
pnl.Initialize("pnl")
Check.Initialize(1)
Check1.Initialize(2)
DoEvents
Dim bgnd As ColorDrawable
bgnd.Initialize(Colors.LightGray, 5dip)
pnl.Background = bgnd
Dim btn1 As Button
'btn1.Initialize("btn1")
'btn1.Text = "Press me"
'pnl.AddView(btn1, 80dip, 50dip, 60dip, 60dip)
pnl.AddView(check,5dip, 50dip, 35dip, 35dip)
pnl.AddView(check1,5dip, 100dip, 35dip, 35dip)
pnl.AddView(testo,40dip, 50dip, 170dip, 50dip)
pnl.AddView(testo1,40dip, 100dip, 170dip, 50dip)
Testo.Visible=True
Testo1.Visible=True
Testo.Hint="Cosa Cerco?"
Testo1.Hint="Dove Cerco?"
'check.Checked=True
'lbl1.Initialize("")
'pnl.AddView(lbl1, 50dip, 120dip, 120dip, 60dip)
cd.AddView(pnl, 5%x, 0%y, 73%x, 40%y) ' sizing relative to the screen size is probably best
If check.Checked=True Then
check1.Checked=False
Testo.Enabled=True
testo1.Enabled=False
Else
If check1.Checked=True Then
Testo.Enabled=False
testo1.Enabled=True
check.Checked=False
Else
End If
End If
ret = cd.Show("Scegli metodo di ricerca", "Sì", "No", "", Bmp)
End Sub