B4J Question [XUI] xCustomListView: Set Alignment?

Discussion in 'B4J Questions' started by ShaneG30, May 23, 2018.

  1. ShaneG30

    ShaneG30 Well-Known Member Licensed User

    Is it possible to set the alignment (Left, Center, Right) of the items in "xCustomListView"?
     
  2. LucaMs

    LucaMs Expert Licensed User

    It would be possible but only by modifying xCustomListView.

    You should create a panel within the panel which will "be the item" and align the first one.

    Something like (not tested, pseudo-code, written here right now):
    Code:
    xCLV.Add(CreateItem(...), ItemValue)
    Code:
    Sub CreateItem(...) As Panel
        
    Dim pnlItem As Panel
        pnlItem.Initialize...
    ...
        
    Dim pnlInternal As Panel
        pnlItem.AddView(pnlItnternal... 
    ' <--- align it
    ...

        
    Return pnlItem
    End Sub
     
    ShaneG30 likes this.
  3. LucaMs

    LucaMs Expert Licensed User

    You can also set pnlItem.Color = Colors.Transparent.
     
  4. LucaMs

    LucaMs Expert Licensed User

    Something like this one (not so nice :p):
     

    Attached Files:

    ShaneG30 likes this.
  5. Erel

    Erel Administrator Staff Member Licensed User

    Are you asking about text items added with AddTextItem?

    There is no alignment at all to other items.
     
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