The Enabled property of the B4XComboBox element set in the constructor does not work.
The code does not work either:
cmb.cmbBox.Enabled = False
How to fix?
What platform are you using?
I tested it with B4J before posting and it works.
Now i tested B4A and it does not work, but cmb. cmbBox .Enabled = False works on my device in B4A.
The code below works for me, tested on all three platforms.:
B4X:
#If B4J
cbxFirstName.mBase.Enabled = False
#Else If B4A
cbxFirstName.cmbBox.Enabled = False
#Else
cbxFirstName.mBtn.Enabled = False
#End If
I looked at your project and the Enabled property doesn't work in B4XDialogs.
I looked into the code of the B4XDialogs Class, and i found that the Enabled property is set to True, internally for all views in the Dialog.
Therefore you cannot change it in your code. Or you need to modify the B4XDialogs class code.
Sub Button1_Click
Dialog.Initialize (Activity)
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 50%x, 58dip)
p.LoadLayout("WitnesDialog")
cmb.cmbBox.Add("0")
cmb.cmbBox.Add("1")
Dialog.PutAtTop = False
Dim rs As ResumableSub = Dialog.ShowCustom(p, "OK", "", "CANCEL")
cmb.cmbBox.Enabled = False
Wait For (rs) Complete (Result As Int)
End Sub
That is what I was telling you earlier, to put the relevant code, not just one line of code by itself. It is hard to guess sometimes. Use code tags too. This thread could have been solved after two or four posts not 14 posts.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.