# Cannot hide Label

**URL:** <https://forum.juce.com/t/cannot-hide-label/12364>\
**Category:** General JUCE discussion\
**Created:** [February 12, 2014, 12:26pm UTC](https://forum.juce.com/t/cannot-hide-label/12364 "2014-02-12T12:26:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joeman](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@joeman](https://forum.juce.com/u/joeman)\
**Post date:** [February 12, 2014, 12:26pm UTC](https://forum.juce.com/t/cannot-hide-label/12364/1 "2014-02-12T12:26:13Z")

</div>

Hi All

I've an issue to hide a label. I have added some labels to my UI using introjucer.  
Each label has its ID set in gthe constructor (labelxx).  
&nbsp;My code is as follow:

> void MyClass::updateUnsavedLabelForIndex(int idx)  
> {  
> &nbsp; &nbsp;Label \*tmpLabel = (Label \*) findChildWithID(String::formatted("label%d", idx));  
> &nbsp; &nbsp;if(tmpLabel)  
> &nbsp; &nbsp;{  
> &nbsp; &nbsp; &nbsp; tmpLabel-\>setText("Test", dontSendNotification);  
> &nbsp; &nbsp; &nbsp; tmpLabel-\>setVisible(false);  
> &nbsp; &nbsp;}  
> }  
> &nbsp;

I can see the label text updated to "test", meaning the label is found using&nbsp;findChildWithID(),&nbsp;but the label is still visible.  
   
Any tip would be greatly appreciated!  
Thanks  
  
&nbsp;

---

<div class="post-metadata">

**Author:** ![joeman](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@joeman](https://forum.juce.com/u/joeman)\
**Post date:** [February 12, 2014, 2:12pm UTC](https://forum.juce.com/t/cannot-hide-label/12364/2 "2014-02-12T14:12:07Z")

</div>

Found the issue, my label text was set with a non ASCII string, and I did not use&nbsp;CharPointer\_UTF8() to set it, causing the issue ...&nbsp;
