Android Question [Solved] Alternative to b4xtable?

Discussion in 'Android Questions' started by RMarra, Oct 13, 2019 at 4:22 AM.

  1. RMarra

    RMarra Member Licensed 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.
     
  2. mangojack

    mangojack Well-Known Member Licensed User

    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: Oct 13, 2019 at 5:17 AM
    Peter Simpson likes this.
  3. AnandGupta

    AnandGupta Active Member Licensed User

  4. emexes

    emexes Well-Known Member Licensed User

    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.
     
    Shelby likes this.
  5. RMarra

    RMarra Member Licensed User

    All good suggestions! Thank you.
     
  6. RMarra

    RMarra Member Licensed User

    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: Oct 13, 2019 at 11:03 PM
  7. RMarra

    RMarra Member Licensed User

    That's an interesting approach. I like the array of labels idea.
     
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