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

An improved version of this class is available here: http://www.b4x.com/forum/additional...icial-updates/30649-class-flexible-table.html


The Table class allows you to show tables of any sizes. The views (labels) are reused to avoid creating many views.

With the help of StringUtils the table can be loaded and saved to a CSV file. It shouldn't be difficult to show SQL tables using DBUtils.ExecuteMemoryTable.

SS-2012-07-04_10.38.01.png


Follow the attached example to see how the class is used. To add it to your own project you need to add the class module to your project and add a reference to StringUtils library.

RemoveRow code is available here: http://www.b4x.com/forum/showpost.php?p=146795&postcount=147

V1.10 uploaded. New method: SetColumnsWidths. Allows you to manually set the width of each column
V1.11 uploaded. Fixes a bug with grey stripes appearing.
 

Attachments

  • Table.zip
    14.9 KB · Views: 7,611
Last edited:

klaus

Expert
Licensed User
Longtime User
Is there any way in the existing library where i can use the functionality of multiple row selection?
Be aware that this is not a library but a Class.
The class in this thread is an 'old' one.
You find the more recent one in the Flexible Table thread, which has a multi select mode..
 

advansis

Active Member
Licensed User
Longtime User
I didn't find any function to set a single column text, I simply wrote it. If you like, please add it to your shared code:

B4X:
public Sub SetHeaderName (Col As Int, Text As String)
    Dim L As Label=Header.GetView(Col)
    L.Text=Text
End Sub
 
Top