# Setting Button properties

**URL:** <https://discourse.julialang.org/t/setting-button-properties/89133>\
**Category:** New to Julia\
**Tags:** makie\
**Created:** [October 23, 2022, 7:59am UTC](https://discourse.julialang.org/t/setting-button-properties/89133 "2022-10-23T07:59:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sransome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sransome/32/29810_2.png) [@sransome](https://discourse.julialang.org/u/sransome)\
**Post date:** [October 23, 2022, 7:59am UTC](https://discourse.julialang.org/t/setting-button-properties/89133/1 "2022-10-23T07:59:21Z")

</div>

Hi,

I’m using Makie to create a basic UI using a grid of buttons that I observe and then run the appropriate code.

```julia
    commandlabels = ["Option A","Option B","Option C"] 
    CommandButtonGrid = fig[3,3] = GridLayout(width=400)
    commandbuttons = CommandButtonGrid[1:3,1] = [Button(fig, label=l, tellheight=false, width=150, color=:red,textsize=20) for l in commandlabels]

```

I would like to alter the button properties, eg color depending on which button is pressed. Sort of like toggling the color of the button text to indicate which option was last chosen.

How do I access the button properties after the button grid is created?

Thanks  
Steve

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [October 23, 2022, 9:33am UTC](https://discourse.julialang.org/t/setting-button-properties/89133/2 "2022-10-23T09:33:54Z")

</div>

You can find Button attributes here [https://docs.makie.org/stable/api/#Button](https://docs.makie.org/stable/api/#Button)

You have a vector of buttons so you can just access them from there like `commandbuttons[1].buttoncolor =...`

---

<div class="post-metadata">

**Author:** ![sransome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sransome/32/29810_2.png) [@sransome](https://discourse.julialang.org/u/sransome)\
**Post date:** [October 23, 2022, 11:10pm UTC](https://discourse.julialang.org/t/setting-button-properties/89133/3 "2022-10-23T23:10:29Z")

</div>

Perfect, thankyou, and thankyou for Makie!
