# Create a page when all the buttons are gone

**URL:** <https://forum.code.org/t/create-a-page-when-all-the-buttons-are-gone/31208>\
**Category:** Coding and Debugging Help\
**Created:** [October 8, 2019, 4:30pm UTC](https://forum.code.org/t/create-a-page-when-all-the-buttons-are-gone/31208 "2019-10-08T16:30:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rachal.randy](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@rachal.randy](https://forum.code.org/u/rachal.randy)\
**Post date:** [October 8, 2019, 4:30pm UTC](https://forum.code.org/t/create-a-page-when-all-the-buttons-are-gone/31208/1 "2019-10-08T16:30:00Z")

</div>

FIrst time poster not sure how to do this, but I am trying to help my student create a page where it reads “you win”. The problem is that she has all the buttons disappear, but we can not figure out how to set the page with the “you win” on it. Any thoughts?

---

<div class="post-metadata">

**Author:** ![madeline\_r\_burton](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/madeline_r_burton/32/5037_2.png) [@madeline\_r\_burton](https://forum.code.org/u/madeline_r_burton)\
**Post date:** [October 10, 2019, 2:10pm UTC](https://forum.code.org/t/create-a-page-when-all-the-buttons-are-gone/31208/2 "2019-10-10T14:10:19Z")

</div>

Hi Rachel. Welcome to the forum!

Can you give me a little more background about what lesson your students are working on? If they’ve learned about screens, this is perhaps a good time to move to a second screen with the “You Win” text. This way, the studen’t won’t have to remove any buttons, they just need to call the change to the next screen.

Good luck!

---

<div class="post-metadata">

**Author:** ![rachal.randy](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@rachal.randy](https://forum.code.org/u/rachal.randy)\
**Post date:** [October 10, 2019, 2:40pm UTC](https://forum.code.org/t/create-a-page-when-all-the-buttons-are-gone/31208/3 "2019-10-10T14:40:23Z")

</div>

My student would like to have the you win screen when you get rid of all the buttons on the screen. Here is the link for the app I am talking about.

> **[Check out what I made](https://studio.code.org/projects/applab/W9uSl1_OcgLqxCU_JuA-0B0QgkFPK3PrcpWvMGNDgRA)**
>
> I wrote the code myself with Code.org

---

<div class="post-metadata">

**Author:** ![madeline\_r\_burton](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/madeline_r_burton/32/5037_2.png) [@madeline\_r\_burton](https://forum.code.org/u/madeline_r_burton)\
**Post date:** [October 10, 2019, 4:32pm UTC](https://forum.code.org/t/create-a-page-when-all-the-buttons-are-gone/31208/4 "2019-10-10T16:32:56Z")

</div>

Gotcha - thanks for the link. What lesson is the student working on? (Its helpful to know so I can suggest using concepts that they’ve learned rather than suggesting fixes that are beyond their knowledge base or can point to a lesson to review that helps solve a similar problem.)

---

<div class="post-metadata">

**Author:** ![rachal.randy](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@rachal.randy](https://forum.code.org/u/rachal.randy)\
**Post date:** [October 10, 2019, 4:51pm UTC](https://forum.code.org/t/create-a-page-when-all-the-buttons-are-gone/31208/5 "2019-10-10T16:51:16Z")

</div>

They are supposed to make an app. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![bhatnagars](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/bhatnagars/32/4919_2.png) [@bhatnagars](https://forum.code.org/u/bhatnagars)\
**Post date:** [October 10, 2019, 7:50pm UTC](https://forum.code.org/t/create-a-page-when-all-the-buttons-are-gone/31208/6 "2019-10-10T19:50:56Z")

</div>

I noticed that the student has only one if (x == 6){ … } block at the end of the program. This must be removed from the end and added to each event after the x is incremented. So each time x gets incremented, we need to check if the game has been won.

To give context to the code, it would really help us if you could provide the lesson number in the future. It helps us know what concepts the student has learned and is expected to use.
