Using a table with buttons

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
wonkabar27
Posts: 3
Joined: Mon Apr 16, 2012 3:26 am

Using a table with buttons

Post by wonkabar27 » Mon Apr 16, 2012 3:48 am

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!
Attachments
Picture 1.png

Klaus
Posts: 14196
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Using a table with buttons

Post by Klaus » Mon Apr 16, 2012 1:47 pm

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? :D


Best

Klaus

wonkabar27
Posts: 3
Joined: Mon Apr 16, 2012 3:26 am

Re: Using a table with buttons

Post by wonkabar27 » Mon Apr 16, 2012 2:15 pm

Thanks a lot Klaus!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7392
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Using a table with buttons

Post by jacque » Mon Apr 16, 2012 6:24 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10320
Joined: Wed May 06, 2009 2:28 pm

Re: Using a table with buttons

Post by dunbarx » Mon Apr 16, 2012 7:34 pm

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7392
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Using a table with buttons

Post by jacque » Mon Apr 16, 2012 8:33 pm

And groups.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: Using a table with buttons

Post by bn » Mon Apr 16, 2012 9:01 pm

and graphics

Kind regards

Bernd

Post Reply