S sorex Expert Licensed User Longtime User Oct 25, 2018 #1 Hello, Has the XUI .enabled property not been worked out completely yet for B4i? If I set it to false it still registers click events. Code: Copy Dim l As Label Dim lv As B4XView l.Initialize("testlabel") lv=l l.Text="click me" lv.Enabled=False Page1.RootPanel.AddView(lv,0,0,100%x,10%y) Sub testlabel_Click Log("click") End Sub I was hoping to simplify this method via the XUI way Code: Copy #if B4A If labels(x).Enabled=True Then #else If labels(x).UserInteractionEnabled=True Then #end if Last edited: Oct 25, 2018
Hello, Has the XUI .enabled property not been worked out completely yet for B4i? If I set it to false it still registers click events. Code: Copy Dim l As Label Dim lv As B4XView l.Initialize("testlabel") lv=l l.Text="click me" lv.Enabled=False Page1.RootPanel.AddView(lv,0,0,100%x,10%y) Sub testlabel_Click Log("click") End Sub I was hoping to simplify this method via the XUI way Code: Copy #if B4A If labels(x).Enabled=True Then #else If labels(x).UserInteractionEnabled=True Then #end if
Erel B4X founder Staff member Licensed User Longtime User Oct 25, 2018 #2 B4XView.Enabled property changes the native Enabled property. It affects the following controls: Button, DatePicker, SegmentedControl, Slider, Stepper and Switch. It doesn't change the UserInteractionEnabled property. It might change in the future. Upvote 0
B4XView.Enabled property changes the native Enabled property. It affects the following controls: Button, DatePicker, SegmentedControl, Slider, Stepper and Switch. It doesn't change the UserInteractionEnabled property. It might change in the future.