# What is the "Hidden" flag used for?

**URL:** <http://forum.squareline.io/t/what-is-the-hidden-flag-used-for/1420>\
**Category:** How to\
**Created:** [June 28, 2023, 9:18am UTC](http://forum.squareline.io/t/what-is-the-hidden-flag-used-for/1420 "2023-06-28T09:18:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jp72](http://forum.squareline.io/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@jp72](http://forum.squareline.io/u/jp72)\
**Post date:** [June 28, 2023, 9:18am UTC](http://forum.squareline.io/t/what-is-the-hidden-flag-used-for/1420/1 "2023-06-28T09:18:39Z")

</div>

### What do you want to achieve?

I have a single screen project and just want to hide certain image labels with a condition in the Arduino code.

### What have you tried so far?

Do i need the hidden flag checked? when i do it still doesn’t work , or am i using the wrong command?  
see below:  
/\*void showIndecatorOn(bool isOn)  
{  
if (isOn) {  
if (lv\_obj\_has\_flag(ui\_turn\_on, LV\_OBJ\_FLAG\_HIDDEN))  
lv\_obj\_clear\_flag(ui\_turn\_on, LV\_OBJ\_FLAG\_HIDDEN);  
} else {  
if (!lv\_obj\_has\_flag(ui\_turn\_on, LV\_OBJ\_FLAG\_HIDDEN)) {  
lv\_obj\_add\_flag(ui\_turn\_on, LV\_OBJ\_FLAG\_HIDDEN);  
}  
} ### Screenshot or video

### Others

- **SquareLine Studio version:**
- **Operating system:**
- **Target hardware:**

---

<div class="post-metadata">

**Author:** ![LeoChris2023](http://forum.squareline.io/user_avatar/forum.squareline.io/leochris2023/32/734_2.png) [@LeoChris2023](http://forum.squareline.io/u/LeoChris2023)\
**Post date:** [June 29, 2023, 7:20am UTC](http://forum.squareline.io/t/what-is-the-hidden-flag-used-for/1420/2 "2023-06-29T07:20:17Z")

</div>

I guess you don’t need to check flag, just add or clear Hidden flag based on your `isOn` statement

---

<div class="post-metadata">

**Author:** ![TroyInFl](http://forum.squareline.io/user_avatar/forum.squareline.io/troyinfl/32/203_2.png) [@TroyInFl](http://forum.squareline.io/u/TroyInFl)\
**Post date:** [June 30, 2023, 3:56pm UTC](http://forum.squareline.io/t/what-is-the-hidden-flag-used-for/1420/3 "2023-06-30T15:56:09Z")

</div>

I just use lv\_obj\_set\_flag and lv\_obj\_clear\_flag, I use them to add or remove the lightning bolt above the battery when it is being charged and remove it when it is not.

lv\_obj\_add\_flag(ui\_turn\_on, LV\_OBJ\_FLAG\_HIDDEN);
