B4A Library [Class] TableView - Supports tables of any size

staticmike

Member
Licensed User
Longtime User
Love the table class library and figured most of it out apart from how to change the row colours ?
I would like to change the Cyan colour to one that matches my app and have looked through the code trying to find a clue as to where this cyan colour is coming from.

I thought it might be something like -

table1.RowColor2 = Colors.Magenta

Any help would be appreciated.

Thanks
 

Mahares

Expert
Licensed User
Longtime User
I am pretty sure it is this line in the class module. Change it to a different color other than cyan if you want:
cRowColor2 = 0xFF98F5FF
 
Last edited:

staticmike

Member
Licensed User
Longtime User
Thanks Klaus.
Looks like i'm on version 1.1. I will try again and thanks again for the quick response.
 

deyvitm

Member
Licensed User
Longtime User
someone has some example of a grid column where you can have as a button or a link, when you click go to an event and can run something, I hope I can help
 

deyvitavara

New Member
Licensed User
Longtime User
Excelent erel,
But I can add a button or an image in a column for that row by row you see the image and you can give specific click for a more ideal design theme , thanks
 

tamayo461

Member
Licensed User
Longtime User


Hi @Merlot2309 i have a problem when i try to delete the last Row, the app close without error. do you know for what?
 

vbmundo

Well-Known Member
Licensed User
Hi,

I'm using your Class, and have a problem creating a second Table in other Layout..

This is my first Table and works fine

g.Initialize(Me, "g", 2)

And this is my second Table

gc.Initialize(Me ,"gc",4)

Of any reason, the second Initialize don't set the NumberOfColumns value correctly.

When I debug the code the NumberOfColums property by 0 after the Initialize

What's Wrong ?

Regards
 

vbmundo

Well-Known Member
Licensed User
Hard to say without seeing the code. There should be no problem adding multiple tables.

Hi

I see the problem... I turn to LandsCope before create the Table using the Phone class

In Portrail works good, but when you change the orientation before doesn't work.

Obviously this is a bug.

I need to show a long table in Landscope, but this don't work with this Table Class

Regards
 

vbmundo

Well-Known Member
Licensed User
Yes, but Look

I has this line before create the TAB

MyPhone.SetScreenOrientation(0)

And the Table turn the columns in '0'

when I quit this line... all works fine...
 

Lyndon Bermoy

Active Member
Licensed User
Longtime User
Hello good day! I tried so many codes on the table_cellclick but I cannot get the correct code on showing or selecting the rows of the table on the database because it always shows the last field/record of the database.

Here's my code:

B4X:
Sub Table1_CellClick (Col As Int, Row As Int)


   Main.cursor1 = Main.sql1.ExecQuery("SELECT * FROM tblStudent")
For i = 0 To Main.cursor1.RowCount - 1
Main.cursor1.Position = 0
       Grading.last =Main.cursor1.GetString("lname")
   Grading.first =  Main.cursor1.GetString("fname")
   Grading.sub1 =  subj
   Grading.sec1 =  sec
   Grading.attendance1 = Main.cursor1.GetString("attendance")
   Grading.per = rb
   Grading.quiztot =  Main.cursor1.GetString("quizTotal")
   Grading.assTot =  Main.cursor1.GetString("assTotal")
   Grading.project =  Main.cursor1.GetString("project")
   Grading.exam =  Main.cursor1.GetString("exam")
   Grading.grade=  Main.cursor1.GetString("grade")
     StartActivity("grading")
   
     Next
End Sub

My code above shows only the last record of my database. All I wanted is that if I select the row, it will show the correct selected field to my next display but it ended up showing the last record of my database. Thanks
 

Pantelis Loizou

Member
Licensed User
Longtime User
Hallo everyone! Need some help...Is there any way in the existing library where i can use the functionality of multiple row selection? E.g. Deletion of muliple rows instead of choosing one by one! Any info would be greatly appreciated. Thanx!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…