B4J Tutorial [BANanoWebix] Lesson 25 Template

Discussion in 'B4J Tutorials' started by Mashiane, Jul 2, 2019.

  1. Mashiane

    Mashiane Expert Licensed User

    Ola

    The template is just also like the scrollview, enabling one to create elements..

    Lesson25_Template.png

    In this image we depict how we have created a container and then added templates on the row. One might use this for displaying data or emphasing something etc.

    Code:
    Sub Init(pgContainer As String)
        pg.Initialize(
    "", pgContainer).SetHeader("Lesson 25: Template")
        
    '
        Dim we As WixElement
        we.Initialize(
    "we").SetPadding(40)
        
    '
        Dim t1 As WixTemplate
        t1.Initialize(
    "t1").SetType("section").SetTemplate("Snarky Greeting")
        
    '
        Dim t2 As WixTemplate
        t2.Initialize(
    "t2").SetTypeClean("").SetTemplate("Hello there, ugly bag of mostly water!")
        
    '
        we.AddRowItems(Array(t1.Item, t2.Item))
        
    '
        Dim pr1 As WixRow
        pr1.Initialize(
    "pr1").SetAutoWidth(True).AddRows(we.Item)
        pr1.AddRows(CreateMap())
        
    '
        pg.AddRow(pr1)
        
    '
        pg.ui
    End Sub
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice