B4J Question [BANano] [SOLVED] Parent Child Relationship with custom views

Mashiane

Expert
Licensed User
Longtime User
Ola

As per note:


I have tried to do this but the parent child relationship is not working for me




This is the result



vcontent is supposed to be a child of vapp, how can I achieve this please. Is there another way that we can use, perhaps via code to set the parent?

This is the console log of getHtml.

B4X:
<div id="app" class="" style=""></div><v-content id="vcontent" class="" style=""><v-app-bar id="vappbar" class="" style=""></v-app-bar></v-content>

Thanks
 

alwaysbusy

Expert
Licensed User
Longtime User
The algorithm seems to work: vappbar is 'inside' vcontent in the Abstract Designer so vcontent is the parent of vappbar.

vcontent is supposed to be a child of vapp
do you mean the tag with id="app"? I don't see a component vapp.

Is this the result you would like?
B4X:
<body>
   <div id="app" class="" style="">
      <v-content id="vcontent" class="" style="">
         <v-app-bar id="vappbar" class="" style=""></v-app-bar>
      </v-content>
   </div>
</body>

This would be archieved by loading the layout to the #app tag:
B4X:
BANano.LoadLayout("#app", "MyLayout")

Alwaysbusy
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…