Page 1 of 1

How can disable the controls from code

Posted: Mon Feb 16, 2015 11:25 am
by AlessioForconi
Hi to all

how can I disable one or more controls from code? It's need to do it one by one?

Thank You

Re: How can disable the controls from code

Posted: Mon Feb 16, 2015 11:30 am
by LCNeil
Hi Alessio,

You should be able to disable controls via its disable property.

e.g. for a button

Code: Select all

set the disabled of button 1 to true
Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
-

Re: How can disable the controls from code

Posted: Mon Feb 16, 2015 11:50 am
by AlessioForconi
Hi Neil
LCNeil wrote:Hi Alessio,

You should be able to disable controls via its disable property.

e.g. for a button

Code: Select all

set the disabled of button 1 to true
Having more controls to disable or enable you necessarily have to do one by one or you can group them?

Thank you

Re: How can disable the controls from code

Posted: Mon Feb 16, 2015 12:02 pm
by jmburnod
Hi Alessio,
Having more controls to disable or enable you necessarily have to do one by one or you can group them?
You can disable all controls of a group like that:

Code: Select all

set the disabled of group "mygroup" to true
Best regards
Jean-Marc

Re: How can disable the controls from code

Posted: Mon Feb 16, 2015 12:08 pm
by AlessioForconi
jmburnod wrote:Hi Alessio,
Having more controls to disable or enable you necessarily have to do one by one or you can group them?
You can disable all controls of a group like that:

Code: Select all

set the disabled of group "mygroup" to true
Best regards
Jean-Marc
Forgive me my many questions but are an absolute beginner.
How do I group the controls?

Thanks

Re: How can disable the controls from code

Posted: Mon Feb 16, 2015 12:35 pm
by AlessioForconi
jmburnod wrote:Hi Alessio,
Having more controls to disable or enable you necessarily have to do one by one or you can group them?
You can disable all controls of a group like that:

Code: Select all

set the disabled of group "mygroup" to true
Best regards
Jean-Marc
Forgive me my many questions but are an absolute beginner.
How do I group the controls?

Thanks

Re: How can disable the controls from code

Posted: Mon Feb 16, 2015 12:54 pm
by jmburnod
Hi Alessio,
Forgive me my many questions but are an absolute beginner.
Please no apologise, this beginner forum is made for that.
To group several controls
1. Select the control you want in your group
2. Click on btn group of the toolbar
3. Group is made :D
For details have a look at "group" in the LC dictionary
Best regards
Jean-Marc

Re: How can disable the controls from code

Posted: Mon Feb 16, 2015 2:47 pm
by AlessioForconi
It's really simple :lol:

Thanks :)

Re: How can disable the controls from code

Posted: Mon Feb 16, 2015 2:52 pm
by Klaus
Buongiorno Alesio,

you might be intereted in taking a look at these great stacks to get the basics of LC:
http://www.hyperactivesw.com/revscriptc ... ences.html

Best

Klaus