# SDL_SetTrayVisible Show or hide a tray icon. ## Header File Defined in [](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_tray.h) ## Syntax ```c bool SDL_SetTrayVisible(SDL_Tray *tray, bool visible); ``` ## Function Parameters | | | | | ---------------------- | ----------- | --------------------------------------------- | | [SDL_Tray](SDL_Tray) * | **tray** | the tray icon to be updated. | | bool | **visible** | true to show the tray icon, false to hide it. | ## Return Value (bool) Returns true on success or false on failure; call [SDL_GetError](SDL_GetError)() for more information. ## Remarks Tray icons are visible when they are created. ## Thread Safety This function should be called on the thread that created the tray. ## Version This function is available since SDL 3.6.0. ## See Also - [SDL_GetTrayVisible](SDL_GetTrayVisible) ---- [CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction), [CategoryTray](CategoryTray)