While LiveCode’s data grid object is a useful and flexible control for displaying table-formatted content, using it can often be challenging due to its complexity. Sometimes you just want to throw some data in a table and have it look nice without having to spend a lot of time configuring it. That’s what this simple table was created for. It’s a LiveCode field with some special styling and requires no extra objects.
 
To view the table stack in LiveCode, simply copy the line below and execute it in your LiveCode message box.


 
To load data into the table, simply set the text property of the table to some tab-delimited text. All visual characteristics can be set using using properties similar to those used by other LiveCode objects. The key to the table’s appearance is the use of custom margin settings and a negative textShift value applied to the text. Combined with styling applied on a per-line basis, a modern, professional-looking result can be easily produced.
 
This table object does have a few limitations, such as the need to populate the field with empty lines if the amount of content runs shorter than the height of the field. Also, if you want to apply any column alignments besides “left”, you must use LiveCode 7 or later.
 
But in the end, this table is a very simple-to-use and relatively quick to customize. It should work on both desktop and mobile. Feel free to use it however you wish.
 

(Visited 902 times, 1 visits today)
3