How to: Disable all buttons in the current card?

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
Cheong
Posts: 30
Joined: Tue Oct 27, 2015 7:49 am

How to: Disable all buttons in the current card?

Post by Cheong » Tue Dec 08, 2015 6:30 am

Hi readers,

Is there a way I can disable all buttons in the current card at once, rather than disable the buttons one by one in lines of coding?

Thanks.

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Re: How to: Disable all buttons in the current card?

Post by Thierry » Tue Dec 08, 2015 6:54 am

Code: Select all

   repeat with Nbutton =1 to the number of buttons of this card
      disable button Nbutton of this card
   end repeat
HTH,

Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

Cheong
Posts: 30
Joined: Tue Oct 27, 2015 7:49 am

Re: How to: Disable all buttons in the current card?

Post by Cheong » Tue Dec 08, 2015 7:12 am

Hi Thierry,

Thanks very much! It works.

Post Reply