TableView Individual Cell Colors

Guardian17

Active Member
Licensed User
Longtime User
I'm still fairly new at B4A.

I have a word game app that I'm trying to write. TableView is a great help for this app, but I would like to be able to control the color of each individual label in a row (Highlighted, Eliminated, Unselected colors for each label) instead of having each entire row appearing as only one of two alternating colors.

Each label in a row is a single letter, and my Main code keeps track of the colors using an array called AlphaStatus(26). The AlphaStatus array values take on values of 0 (UnSelected), 1 (Highlighted), or 2 (Eliminated) to determine their background colors.

I believe ShowRow is the place to handle most of this, and that the color selection for the labels must be moved into the last For/Next loop of ShowRow, but I'm unsure exactly how to do this given the way that the current Table rows take on the colors of the Drawables in "innerClearAll".

Also, I don't have the need to select/highlight a complete row in the Table. Is there an easy way of disabling the SelectRow function in "Cell_Click" while still allowing me to click on individual labels in a row to apply the aforementioned AlphaStatus attributes to an individual label?

I hope this is not a major change requiring a lot of work on the part of those that might help me with this, but I truly appreciate any help that is provided.

By the way, THANKS to Merlot2309 for adding "InsertRow" to the Table Class.
 

Guardian17

Active Member
Licensed User
Longtime User
Thanks

Erel:

Thank you for pointing me in this new direction. Didn't know about CustomListView, and at most there will be 50 words in the ListView. Will give it a go for my App.

I want to say that B4A is a godsend over struggling with Eclipse and Java directly. I struggled for months with Eclipse and always had errors in code any time I tried examples I found on the Web, and therefore really couldn't learn much that way.

I've had quite a bit of Visual Basic experience, and B4A is so easy to use in comparison to Eclipse and Direct Java, as a follow-on for Android programming. And the Forums are so responsive to get answers to questions.

Kudos to you, your team, and all of those great people that take the time to monitor and answer the questions that come up on your Site.
:sign0188::icon_clap:
 
Upvote 0
Top