Android Question [Solved] Alternative to b4xtable?

RMarra

Member
Licensed User
Longtime User
I know someone is going to bite my head off for asking (it's ok, I'm getting used to it), but is there an alternative to using the B4XTable to show a table of data? I have been trying to work with the B4XTable, but I need to turn off the pnlHeader. In order to do this I need to have a Sleep(0) beforehand. This of course screws up my logic flow. I have read and watched all the tutorials on resumable subs and still cannot figure out how to get around this.

Unless someone can tell me how to get around this sleep(0) problem, I need a different approach.

All I need is a simple 2 X 8 table that I can set individual cells and manipulate individual cell colors. It's not just that the B4XTable is difficult to use, but is actually overkill for me. I'm not knocking B4XTable. It's just not doing what I need to do.

Thank you to anyone who can help me without criticizing.
 

mangojack

Expert
Licensed User
Longtime User
All I need is a simple 2 X 8 table that I can set individual cells and manipulate individual cell colors.

https://www.b4x.com/android/forum/t...listview-cross-platform-customlistview.84501/

1. Remove CLV1 and relative code
2. Edit the CellItems layout to just have two Labels ( loaded to CLV2)
3. You populate these labels in the CreateListItem sub. (called for each Row)

You can place a panel/labels above the CLV for a header.

note: you might get designer script error due to CLV1 not present.

There are many threads on accessing the item rows and views to edit data , recolor the parent row panel etc.

Edit: I see this thread https://www.b4x.com/android/forum/threads/customlistview-column-headings-click-event.110442/
So all the above might be Moot
 
Last edited:
Upvote 0

emexes

Expert
Licensed User
All I need is a simple 2 X 8 table that I can set individual cells and manipulate individual cell colors.
What is the aversion to just using 16 labels? Is scrolling necessary, or can you show the full 8 lines on every device you're likely to run on? Do you need to edit table contents, or could you place a transparent panel over the "table" to capture the touch events and move/scroll the "table" about using its container .Left and .Top properties?

You can create the labels programmatically in a loop (or two) rather than individually in Designer, even have them in a two-dimensional array rather than as 16 separate variables.
 
Upvote 0

RMarra

Member
Licensed User
Longtime User
[XUI] SD FlexGrid (Table) by Star-Dust may help too,

It looks awesome, but seems to still be beta. A little buggy. I'm going to play with it a little longer. Thanks for the suggestion.
 
Last edited:
Upvote 0

RMarra

Member
Licensed User
Longtime User
Just add this code at the end of Activity_Create

I am aware.

When I had just one table, I was able to set everything up in Activity_Create without an issue. But now I need to create additional tables outside the Activity_Create subroutine. The place where I am defining the table makes the Sleep(0) a problem.
 
Upvote 0
Top