sizing columns in a table field

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: sizing columns in a table field

Post by bn » Tue Jan 12, 2010 1:12 pm

I uploaded a stack "OldTableFieldDragDividers" to the 'new' RevOnline, the one for Rev 3.5 and greater. You can also search for Bernd, or table field or Column size.
regards
Bernd

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: sizing columns in a table field

Post by bn » Tue Feb 16, 2010 6:18 pm

Renaud,
I have uploaded a new version to RevOnline. Look for "OldTableFieldDragDividers", or search for Bernd.
It is a cleaned up version with a lot of comments in the code and a couple of new functions:
if you hold down the option key and click on the first divider and drag it all dividers will be of the size of the first column
if you hold down the control key and click into the field the column width adjusts to the width of the text
if you work on a unlocked field with dividers and you move the mouse (not pressed) into the field the field will lock temporarily, moving the mouse out of the field will unlock the field.

Since I used the table field for the display of binary data I found these functions useful.
regards
Bernd

NoN'
Posts: 96
Joined: Thu Jul 03, 2008 9:56 pm
Contact:

Re: sizing columns in a table field

Post by NoN' » Fri Feb 26, 2010 6:55 pm

Bernd,

First : Sorry, I've been very long to answer to your last post.
I've tried the new : "OldTableFieldDragDividers" and it works fine here. A very very good job again.

Promise : when I'll have some time, I'll try to make a mixture from columna an OTFDD which I'll suggest you.

Just remember that, for those who, like me, has just the media version of Rev, the OLD table field is just THE table field.
That's why a tool like OTFDD or columna can be very useful as you notice it.

Au plaisir de te lire à nouveau et bonne continuation.

regards,

renaud

a-revuser
Posts: 23
Joined: Fri Dec 04, 2009 10:23 am

Re: sizing columns in a table field

Post by a-revuser » Sat Feb 27, 2010 5:42 pm

I often use tables and when setting out the width of the cell for contents and headings, I use this quick script.

For example, create a new stack, drag a table onto the card and name it Table.
Drag a button on the card, leave as button.
put this script into the button.
on mouseUp
set the tabstops of fld "table" to 10,10,20,100,15
end mouseUp
Compile and click Button
The columns will re-size
I am seldom interested in the actual values of the Tab stops in properties but for the example shown, they result in
10,20,40,100,115
So you see, the right hand value is added to the sum of the left values.
I find it easy to update the script values to fine tune the spacing, the values in the properties will sort themselves out.
You can hide or delete the button when you want to so your interface is not spoilt.

Post Reply