# Change state of a GLMakie toggle programmatically

**URL:** https://discourse.julialang.org/t/change-state-of-a-glmakie-toggle-programmatically/127860
**Category:** Visualization
**Tags:** glmakie
**Created:** [April 8, 2025, 5:22pm UTC](https://discourse.julialang.org/t/change-state-of-a-glmakie-toggle-programmatically/127860 "2025-04-08T17:22:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lgmendes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lgmendes/32/34577_2.png) [@lgmendes](https://discourse.julialang.org/u/lgmendes)
#### Post date: [April 8, 2025, 5:22pm UTC](https://discourse.julialang.org/t/change-state-of-a-glmakie-toggle-programmatically/127860/1 "2025-04-08T17:22:27Z")

</div>

How can I change the state of a GLMakie toggle programmatically and ensure it is reflected in the figure?

I have access to the state of the toggle vector and want to restore the toggles programmatically with proper reflection in the figure.

For example:

julia

```julia
[toggleAll[ind].active[] for ind in 1:numberOfImages]

```
