If the grid is visible, do this. If it's not, do this instead. How? in Developer Help
mob var grid_is_visible proc hide_grid() if(grid_is_visible) grid_is_visible = 0 winshow(src, "grid", 0) show_grid() if(grid_is_visible) return grid_is_visible = 1 winshow(src, "grid") toggle_grid() grid_is_visible ? hide_grid() : show_grid()
var is_visible = winget(src, "grid_id", "is-visible")if(is_visible == "true") return TRUEelse return FALSE
The other way, which is a much more straightforward solution to your painfully simple question, is to use winget().