B4J Question [SOLVED] Why Doesn't This CustomListView Populate Like I Expect?

cklester

Well-Known Member
Licensed User
I'm having a problem populating a CustomListView. It is only ever adding one of the items (the last one added).

See attached project.

Once you click the "Sign in" button, you should see a window with a CustomListView of buttons on the left-hand side. I'm adding three. However, it only ever displays one (the last one added to the CLV). What am I doing wrong?
 

Attachments

  • clv_error.zip
    24.6 KB · Views: 206

OliverA

Expert
Licensed User
Longtime User
newMenuBttn panel needs a height. As is, it has a height of 0 and therefore each CLV item starts at the top of the CLV (0+0=0, so each panel stacks on top of each other).
 
Upvote 0

cklester

Well-Known Member
Licensed User
newMenuBttn panel needs a height. As is, it has a height of 0 and therefore each CLV item starts at the top of the CLV (0+0=0, so each panel stacks on top of each other).

Ah, OK. I'll try that. (IT WORKED! THANK YOU!)

I was basing this all off an example that Erel gave me, but he used
B4X:
LeftList.AddTextItem("Table", tbl)
, so I forgot about the height adjustment.

Even without the height thing, one of the buttons shows up in the CLV... So, if the height were required, why does that one button show up?
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
They all show up. They are just on top of each other
 
Upvote 0
Top