hide groups

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

hide groups

Post by bsouthuk » Thu Nov 25, 2010 11:07 pm

Hi All

Could you let me know if it is possible to hide all groups and fields within a stack by clicking a button? Is it a simple one line of code for this?

Thanks

Daniel

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: hide groups

Post by Dixie » Thu Nov 25, 2010 11:28 pm

bsouthuk...

Code: Select all

repeat with count = 1 to the number of groups of this card
  set the vis of group count of this card to false
end repeat
Oops... I didn't read your post very well... the above would hide the groups on just one card. To hide all the groups within a stack then you would have to loop through all the cards..

Code: Select all

repeat with count = 1 to the number of cards of this stack
  put the number of groups of card count into groupCount
  repeat with count2 = 1 to groupCount
    set the vis of group count2 of card count to false
  end repeat
end repeat
be well

Dixie

Post Reply