B4J Question CustomListView with multiple column header

walterf25

Expert
Licensed User
Longtime User
Hey everyone, my brain is not braining as it used to, I have a CustomListView in my B4J app that looks like this;


The header is just a panel I have placed over the CLV with 4 buttons, the problem I am having and don't understand why, is that when I maximize the app window the button headers don't get resized to the same width of the columns of the items in the List, I have tried several things but don't understand what I'm doing wrong, in the picture it looks fine because what I ended up doing is loading the layout I am suing for the items in the CLV into the panel header and setting the header buttons to the same width as the columns in the CLV items, this works when launching the app but if the window gets resized then the header buttons won't adhere to the same sizes, does anyone have a good solution for this, how do you guys add headers when using a CustomListView and how do you guys get around this issue of keeping the header widths the same so they match the widths of the columns in the customlistview. Here's what it looks like when resized


Any ideas?

Thanks All.
 

William Lancee

Well-Known Member
Licensed User
Longtime User
When I have had similar problems, the solution was to explicitly disable the handles resize in the containers.
In order words, uncheck in designer and handle in your resize event handler.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
1. Why not use B4XTable?

2. Try put the resize code in B4XPage_Resize

3. Sometimes add Sleep(0) may help
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…