[ANN] Table Lab
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
[ANN] Table Lab
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.
- Attachments
-
- TableLab.livecode.zip
- (5.51 KiB) Downloaded 455 times
Re: [ANN] Table Lab
Thanks, Scott!
Tom Bodine
Tom Bodine
Re: [ANN] Table Lab
No problem. Hope the stack is useful for you.
-
- Livecode Opensource Backer
- Posts: 1336
- Joined: Sun Jul 12, 2009 10:53 am
- Location: Bordeaux, France
Re: [ANN] Table Lab
Scott Rossi...
A nice piece of work...
Have you seen a similar offering that Bernd Niggeman made back in March ?... modTableField
A nice piece of work...
Have you seen a similar offering that Bernd Niggeman made back in March ?... modTableField
Re: [ANN] Table Lab
Thanks for the kind words. I've been looking at Bernd's stacks for years, and am familiar with modTableField -- Bernd makes great things. (In fact, I sent an early copy of this to Bernd since I know he's been exploring solutions for alternating color rows.)Dixie wrote:Scott Rossi...
A nice piece of work...
Have you seen a similar offering that Bernd Niggeman made back in March ?... modTableField
While not as feature-rich as modTableField, this table is a single object with no object dependencies, which makes it pretty easy to use. Clearly it has some limitations, but I've been using the technique in mobile lists for a while now and so far it has worked well.