How to hide component when user clicks away

thanks, sorry i have another issue on slider, i am trying to hide the slider when a user click on other area of the screen, but it does not seem to work

slider

once user have changed the font, how can i hide it by touching the other area of the screen

If you want to hide the slider, you need to set “Slider1.Visible to false”; not to ‘true’

1 Like

i have created the font button where when a person click, slider appear,

but i’m stuck on how do i remove it when i touch other area of the screen, not by click button

thanks

Touching something AWAY from the slider either is an even, or is not.

Many objects have a “lost focus” event, but that is not the case of the slider. Therefore, the only way to have something when another area is touched is for every other event to include a call to make the slider disappear. And if there are elements and areas in the display that do NOT have a touch event that you can trap, then you are stuck. That is they way things are.

That said, why not turn your fontbtn into a toggle instead?
Basically, you do it like this:

image

Click it once, and the slider becomes visible. Click it again, and it goes away.

2 Likes

much thanks