Android Question How is column width being set?

Tim Chapman

Active Member
Licensed User
Longtime User
In the example code here, how is the column width of the displayed table being set?
Thank you!
 

LucaMs

Expert
Licensed User
Longtime User
The Sub LoadTable calls the method SetHeader of the Table class, which also sets the width of the columns.

The Table class also has the SetColumnsWidths method.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
The Table Class used in the demo program of the Read / Write Excel files on Android thread is a very very old one.
There does exist a more recent Class in the Flexible Table thread, which is an evolution of the Table Class.
The latest Class version is 1.44, this is the TableV1_44.zip project.
And then, the Table Class has become a CustomView and the latest version is 3.33 which is much more sophisticated.
But then, it depends on your expectations and needs for the Table.
The TableV1_44 Class supports automatic column widths adjusted according to the widest text in the column and horizontal scrolling.

Attached the ExcelExample project with the Table class version 1.44.
It needs following additional libraries:
SQL, an internal library you just need to check it in the Libraries Manager
ScrollView2D, an additional library, you need to unzip it and copy the ScrollView2D.jar and the ScrollView2D.xml files into the Additional Libraries\B4A folder.
Reflection, an additional library, you need to unzip it and copy the Reflection.jar and the Reflection.xml files into the Additional Libraries\B4A folder.
 

Attachments

  • ExcelExample1.zip
    27.6 KB · Views: 158
Upvote 1
Cookies are required to use this site. You must accept them to continue using the site. Learn more…