B b4auser1 Well-Known Member Licensed User Longtime User Jun 28, 2015 #1 B4A 5.02 B4X: Dim l_Button As Button : l_Button.Initialize("") Log($"l_Button = ${l_Button Is Label}"$) Log($"l_Button = ${l_Button Is Button}"$) Dim l_View As View = l_Button Log($"l_View = ${l_View Is Label}"$) Log($"l_View = ${l_View Is Button}"$) l_Button = true l_Button = true l_View = true l_View = true
B4A 5.02 B4X: Dim l_Button As Button : l_Button.Initialize("") Log($"l_Button = ${l_Button Is Label}"$) Log($"l_Button = ${l_Button Is Button}"$) Dim l_View As View = l_Button Log($"l_View = ${l_View Is Label}"$) Log($"l_View = ${l_View Is Button}"$) l_Button = true l_Button = true l_View = true l_View = true
Erel B4X founder Staff member Licensed User Longtime User Jun 28, 2015 #2 A Button is a subclass of Label. So it will return true. Note that you can actually treat a button as a label: B4X: Dim lbl As Label = Button1 lbl.Text = "aaa"
A Button is a subclass of Label. So it will return true. Note that you can actually treat a button as a label: B4X: Dim lbl As Label = Button1 lbl.Text = "aaa"
B b4auser1 Well-Known Member Licensed User Longtime User Jun 28, 2015 #3 Thank you for detailed explanation ! I have found a workaround for my situation.