Bug? Custom views are not views

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is not a bug. CustomViews are not views. This was always the case.

One way to get a reference to clsMyCustomView instance is by adding it as a tag to the base panel (or the main view if you are not using the base panel):

B4X:
Sub DesignerCreateView (...)
Base.Tag = Me
...
End Sub
B4X:
Dim MyView As clsMyCustomView = MyPanel.GetView(0).Tag
 

Informatix

Expert
Licensed User
Longtime User
This is not a bug. CustomViews are not views. This was always the case.

One way to get a reference to clsMyCustomView instance is by adding it as a tag to the base panel (or the main view if you are not using the base panel):

B4X:
Sub DesignerCreateView (...)
Base.Tag = Me
...
End Sub
B4X:
Dim MyView As clsMyCustomView = MyPanel.GetView(0).Tag
I'm so used to Java for my custom views that I have no experience with custom views in B4A. Thanks for the tip.
 
Top