# G4P Library - change button color after adding to panel

**URL:** <https://discourse.processing.org/t/g4p-library-change-button-color-after-adding-to-panel/369>\
**Category:** Libraries\
**Created:** [May 25, 2018, 9:16am UTC](https://discourse.processing.org/t/g4p-library-change-button-color-after-adding-to-panel/369 "2018-05-25T09:16:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erichwe](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@erichwe](https://discourse.processing.org/u/erichwe)\
**Post date:** [May 25, 2018, 9:16am UTC](https://discourse.processing.org/t/g4p-library-change-button-color-after-adding-to-panel/369/1 "2018-05-25T09:16:15Z")

</div>

Hi there!

I created a GButton of the G4P library and added this button successfully to my panel - it has now the color of the current colorscheme. Is there a way to change to color of the button AFTER adding it to the panel?

I don’t know how to address this specific button after adding the control to the panel.

Regards,  
Eric

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [May 25, 2018, 1:46pm UTC](https://discourse.processing.org/t/g4p-library-change-button-color-after-adding-to-panel/369/2 "2018-05-25T13:46:02Z")

</div>

There are [2 users guides](http://www.lagers.org.uk/g4p/guides/g01-overview.html) on my website covering colour schemes and changing colours of individual controls I suggest you have a look.

> I don’t know how to address this specific button after adding the control to the panel.

If you need to access a control after its been created then keep its identifier global

---

<div class="post-metadata">

**Author:** ![erichwe](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@erichwe](https://discourse.processing.org/u/erichwe)\
**Post date:** [May 28, 2018, 5:49am UTC](https://discourse.processing.org/t/g4p-library-change-button-color-after-adding-to-panel/369/3 "2018-05-28T05:49:26Z")

</div>

Thank you! I must have been blind…
