Hii experts,
I have to create an application by custom components class.
in which I want all same property of default object.
like Button class, I want to create my custom components button which contains all property and event of buttons. like in other software, there is option of base class, to take all similar property to this class.
I created a new custom components custbutton
I add it in my designer trying to generate button_click event, but it not show.
I try it. I create my custom view. In designercreateview my code is :
B4X:
Public Sub DesignerCreateView (Base As Panel, Lbl As Label, Props As Map)
mBase = Base
Dim label As Label
label.Initialize("label1")
mBase.AddView(label,0,0,mBase.Width,mBase.Height)
label.Color = Colors.Transparent
Log(label.Text)
'label.TextColor = Colors.Black
End Sub
in designer view I assigned property text, but It not show in my application.
As my first link shows, Inheritance will (most likely) not be implemented in the B4X products. The recommended approach is Composition (https://en.wikipedia.org/wiki/Composition_over_inheritance) as mentioned in the last two links of my post.
I have issue that, I created default property of color, then I insert object in activity, if then I change the color default property then activity color does not change.