Moving through the controls of a group

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: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
brainois
Posts: 10
Joined: Fri Dec 01, 2006 10:19 pm

Moving through the controls of a group

Post by brainois » Thu Dec 28, 2006 10:29 am

Hello,

I would like to move through the controls of a group. Is there a control structure like this:

Code: Select all

repeat for each item of MyGroup
-- do sothemeing on each item...
end repeat
regards

François

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5147
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Dec 28, 2006 10:42 am

François,

repeat with x = 1 to number of controls of grp "Group Name"
-- do something with control x of grp "Group Name"
end repeat

You can also use the number of buttons, number of fields, etc.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”