B4J Question B4J CLV Background

CR95

Active Member
Licensed User
In the B4J Test joined program, I build a form with a pane with a blue color and I add a CLV with a green background color. This is correct in the WYSIWYG IDE view.

But in the execution, the CLV background is white

Is it a bug or a misunderstanding ?
 

Attachments

  • Test.zip
    501.2 KB · Views: 5

LucaMs

Expert
Licensed User
Longtime User
Custom views, and CustomListView is a custom view, don't use all the properties you see in the Designer. In WYSIWYG, you see a green placeholder.

Your CustomListView is empty, but even if you added some items, you wouldn't see the inner panel (green) because it would be as tall as the sum of the item heights, no more.

TRY this, but manually setting the inner panel's height is absolutely not recommended.

B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    
    #IF B4J
        CustomListView1.sv.As(ScrollPane).InnerNode.PrefHeight = 200dip
        CustomListView1.sv.As(ScrollPane).InnerNode.As(B4XView).Color = xui.Color_Green
    #End If
End Sub
 
Upvote 0
Top