Android Question B4XFloatTextField - Enabled Unable (Solved)

f0raster0

Well-Known Member
Licensed User
Longtime User
Hi Team,

I'm trying to disable the user's ability to enter text in the B4XFloatTextField1
I've tried various options like setting Enabled or Visible to False, added panel over B4XFloatTextField1, but the keyboard still appears when the user taps on the B4XFloatTextField1
How can I prevent this?

B4X:
Private Sub rdBtn2_CheckedChange(Checked As Boolean)    
    B4XFloatTextField1.TextField.Enabled = False
    B4XFloatTextField1.TextField.Visible = False
    B4XFloatTextField1.mBase.Visible = False
        
End Sub

thanks in advance
 
Solution
thanks guys

solved:
B4X:
Private Sub rdBtn1_CheckedChange(Checked As Boolean)
    B4XFloatTextField1.TextField.Enabled = True
End Sub

Private Sub rdBtn2_CheckedChange(Checked As Boolean)
    B4XFloatTextField1.TextField.Enabled = False
End Sub

LucaMs

Expert
Licensed User
Longtime User
B4X:
B4XFloatTextField1.TextField.Enabled = Not(B4XFloatTextField1.TextField.Enabled)
B4XFloatTextField1.lblClear.Enabled = Not(B4XFloatTextField1.lblClear.Enabled)
B4XFloatTextField1.lblV.Enabled = Not(B4XFloatTextField1.lblV.Enabled)

Note that this works in B4J:
Try this
B4X:
B4XFloatTextField1.mBase.Enabled = False


[A "Wish" for Erel: add the Enabled property]
 
Upvote 1
Top