# Deaktivate and hide buttons

**URL:** https://forum.kirupa.com/t/deaktivate-and-hide-buttons/63702
**Category:** Uncategorized
**Created:** [September 9, 2004, 9:27am UTC](https://forum.kirupa.com/t/deaktivate-and-hide-buttons/63702 "2004-09-09T09:27:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![fightalone](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@fightalone](https://forum.kirupa.com/u/fightalone)
#### Post date: [September 9, 2004, 9:27am UTC](https://forum.kirupa.com/t/deaktivate-and-hide-buttons/63702/1 "2004-09-09T09:27:04Z")

</div>

ok… my question is: how to deaktivate a button so it cant be clicked anymore… and lateron aktivate it again…

i could simply fade the button… but when the user moves the mouse over the faded button it still could be clicked… and i want to avoid this…

thx in advance for any help

yours sincerly

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 9, 2004, 9:32am UTC](https://forum.kirupa.com/t/deaktivate-and-hide-buttons/63702/2 "2004-09-09T09:32:18Z")

</div>

buttonname.enabled = false;

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 9, 2004, 11:59am UTC](https://forum.kirupa.com/t/deaktivate-and-hide-buttons/63702/3 "2004-09-09T11:59:59Z")

</div>

Well… you used the code above posted by amanuo… But to reactivate it you need to set buttonname.enabled = true; on another button… so let’s just say for example you have 4 buttons… it would look something like this…

```auto
 
[color=red]on (release) {
button1.enabled = false; [/color]
[color=red]button2.enabled = true;[/color]
[color=red]button3.enabled = true;[/color]
[color=red]button4.enabled = true;[/color]
[color=red]}[/color]

```

That code would be on the first button… The for the second button it would be…

```auto
 
[color=red]on (release) {
button1.enabled = true; [/color]
[color=red]button2.enabled = false;[/color]
[color=red]button3.enabled = true;[/color]
[color=red]button4.enabled = true;[/color]
[color=red]}[/color]

```

and so on…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 9, 2004, 1:53pm UTC](https://forum.kirupa.com/t/deaktivate-and-hide-buttons/63702/4 "2004-09-09T13:53:29Z")

</div>

thx guys… thats all i need to know…
