Bug? Custom views are not views

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):

Code: Copy
Sub DesignerCreateView (...)
Base.Tag = Me
...
End Sub
Code: Copy
Dim MyView As clsMyCustomView = MyPanel.GetView(0).Tag
 
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):

Code: Copy
Sub DesignerCreateView (...)
Base.Tag = Me
...
End Sub
Code: Copy
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.
 
Back
Top