Page 1 of 1
Using a table with buttons
Posted: Mon Apr 16, 2012 3:48 am
by wonkabar27
Hi,
I'm working on a time management software program using Livecode and I'm a beginner.
Please see attached screenshot of what I've done so far.
I'd like to use a table so the buttons I have will be aligned and uniform looking but I can't seem to define my table to a smaller amount of rows and columns. For example, is there a way to define a 6 column by 4 row table? And is it possible to have the buttons sit within the table?
Any advice is welcome on how I might proceed to make this first page more professional.
Also, I've been trying to figure out why my Mainstack file is still titled "Untitled 5" even though I keep 'Saving As' something different.
Thanks!
Re: Using a table with buttons
Posted: Mon Apr 16, 2012 1:47 pm
by Klaus
Hi wonkabar27 (Willy?

)
wonkabar27 wrote:I'm working on a time management software program using Livecode and I'm a beginner.
Welcome to the forum!
Please check these stack to get a "feel" for LiveCode:
http://www.runrev.com/developers/lesson ... nferences/
wonkabar27 wrote:I'd like to use a table so the buttons I have will be aligned and uniform looking but I can't seem to define my table to a smaller amount of rows and columns. For example, is there a way to define a 6 column by 4 row table? And is it possible to have the buttons sit within the table?
What do you mean with "table"? The "table" field in LiveCode?
This does only support TEXT as content, no butttons.
wonkabar27 wrote:Also, I've been trying to figure out why my Mainstack file is still titled "Untitled 5" even though I keep 'Saving As' something different.Thanks!
Since LiveCode can save more the ONE stack in ONE file, the FILENAME (save as...) is NOT the name of the mainstack, they can be different!
In the "inspector" palette for your stack enter a NAME for the stack!
And you can even add a TITLE for your stack, that is the text that is displayed in the windows titlebar.
So: NAME of stack <> TITLE of stack <> filename of stack
Disturbing, isn't it?
Best
Klaus
Re: Using a table with buttons
Posted: Mon Apr 16, 2012 2:15 pm
by wonkabar27
Thanks a lot Klaus!
Re: Using a table with buttons
Posted: Mon Apr 16, 2012 6:24 pm
by jacque
wonkabar27 wrote:I'd like to use a table so the buttons I have will be aligned and uniform looking but I can't seem to define my table to a smaller amount of rows and columns. For example, is there a way to define a 6 column by 4 row table? And is it possible to have the buttons sit within the table?
As Klaus mentioned, tables are for text. If the button arrangement will never change, then what you have is fine. Generally we just set up the alignment once during development and leave it that way. If you want to accomodate resizing then you need to write a handler that does the math. The handler needs to determine the relative width and height of the "table", divide it by the number of "columns" and "rows", and then step through all the buttons to reset their locations. If that sounds like what you want to do, give it a try and when you get stuck write back.
Also, I've been trying to figure out why my Mainstack file is still titled "Untitled 5" even though I keep 'Saving As' something different.
A stack has three different "name" properties. The filename is the one on disk. The "name" is the actual name of the stack when it is loaded into LiveCode. And the "label" is optional display text for those cases where you want the name of the stack to be different than what shows in the title bar. It's convenient, for example, to set the name of the stack to something short and easy to type into scripts, and the label to something longer that the user will see.
All new stacks are named "untitled". Use the stack property inspector to set the stack name. The stack name can be completely different from the file name on disk.
Re: Using a table with buttons
Posted: Mon Apr 16, 2012 7:34 pm
by dunbarx
What Jacque said.
Note that this naming flexibility applies to buttons as well (though, I think, no other object classes) since these also generally display a name. It can be very useful, but you will only appreciate it when the need arises, and it will.
Craig Newman
Re: Using a table with buttons
Posted: Mon Apr 16, 2012 8:33 pm
by jacque
And groups.
Re: Using a table with buttons
Posted: Mon Apr 16, 2012 9:01 pm
by bn
and graphics
Kind regards
Bernd