[ANN] Table Lab
Posted: Fri Aug 07, 2015 2:32 am
This stack demonstrates a way to customize a field control so that it includes alternating colored lines and behaves like a row-based table. While the field uses a behavior script, no other controls are used to achieve the result beyond the field itself. The key to the effect is the use of custom margin settings and a negative textShift value applied to the text.
This technique 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. For myself, I like the simplicity of using this control in place of a data grid or other complex object, where possible.
The stack was built in LC7 and takes advantage of the tabAlign property, but has been saved in legacy format, so it should run in any version of LC from 5.5 onward (minus the tab alignment feature).
Free to use and adapt for anything.
This technique 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. For myself, I like the simplicity of using this control in place of a data grid or other complex object, where possible.
The stack was built in LC7 and takes advantage of the tabAlign property, but has been saved in legacy format, so it should run in any version of LC from 5.5 onward (minus the tab alignment feature).
Free to use and adapt for anything.