cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JHAKANS
Frequent Visitor

Hide and show text based on timer

Hi! 

 

I'm trying to hide a text label based on a timer. Let's say I want a text to be hidden until the timer says 5sec and then I want the text to show for 5sec and then disappear again. 

 

The concept I'm trying to achieve is to have something like a label slide show. I want the text to appear and disappear base on different time values. 

 

I have tried some variations of (Timer1.Value-5000) in the text visible tab but can't get it to work. 

 

Does someone have any ideas?  

1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Super User II
Super User II

Hi @JHAKANS,

 

Let me see if I correctly understood your request.

You want a Label.Text to be shown for 5 (variable time) seconds and then to be hidden for another 5 seconds, right ?

 

If so, you have to set the  Visible  property of the label to:

Mod(RoundDown(Timer1.Value/5000,0),2)=1

 

and you'll get something like this:

ezgif.com-gif-maker.gif

View solution in original post

5 REPLIES 5
gabibalaban
Super User II
Super User II

Hi @JHAKANS,

 

Let me see if I correctly understood your request.

You want a Label.Text to be shown for 5 (variable time) seconds and then to be hidden for another 5 seconds, right ?

 

If so, you have to set the  Visible  property of the label to:

Mod(RoundDown(Timer1.Value/5000,0),2)=1

 

and you'll get something like this:

ezgif.com-gif-maker.gif

View solution in original post

Thank you! this is exactly what I was looking for 😀

Tried the code and I was wrong. I want the text to disappear completely after it has shown for the 5sec. So the text should not be visibly for 5sec then show for 5sec and after that disappear completely and not return visible.  

 

Hi @JHAKANS again 🙂,

Sorry to hear that my formula is not what you want.. So the for first 5 seconds you want the text to be shown and after that to dissapear for good ...

Well, set VISIBLE property of the label to:

   Timer1.Value<5000

What is the timer duration ? Is the repeat property set to true (because for the  first 5 seconds the text will be shown again)?

(Timer1.Value<0;; Timer1.Value>5000;;Timer1.Value<0)

 

More like this:  Visible false for 5sec, Visible true for 5sec, Visible false forever. 

 

Because after that label is gone I want to display another label with new content and after that, I want to display another one and so on.  

And I need to be able to set different time values on every label. Because some of them shall be presented longer than the others. 

 

Think of it like when they roll credits in a movie. Where they display a certain amount of text and it disappears and reveals another one. 

If that makes more sense haha

 

BR

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (23,527)