How can I use the timer to controle the visibility of members?

Robto

Member
Licensed User
Longtime User
Hi all,

I would like to use a timer to change the visibility of members. I couldn't find an example. Can someone point me in the right direction please?

Cheer,
Robin
 

Robto

Member
Licensed User
Longtime User
What do you mean by "members"? what is it you need or trying to do?

Hi NJDude, I want to hide and show buttons. Click on a button to start the sequence of colored buttons like a disco light. It's a total of 5 colored buttons on the same place x, y coordinates.

Thanks in advance.
 
Upvote 0

Robto

Member
Licensed User
Longtime User
Hi NJDude,

Thank you for the code. Although it is exactly what I described, it is not what I had in mind (my bad).

I have 5 buttons and only 1 is visible. I want only one visible at all times. When I press that visible button, I want to have another button turn visible (and the one thats visible to turn unvisible), and I want the one that is visible to change every timer interval

Thank you.
 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
Set up a timer that makes all the buttons invisible, and then makes one randomly visible. Make sure that you reset the timer interval in the tick event.

Set up the button click events to call the timer tick event.
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
Hi NJDude,

Thank you for the code. Although it is exactly what I described, it is not what I had in mind (my bad).

I have 5 buttons and only 1 is visible. I want only one visible at all times. When I press that visible button, I want to have another button turn visible (and the one thats visible to turn unvisible), and I want the one that is visible to change every timer interval

Thank you.

Ok, I have modified the code and reposted it.
 
Upvote 0

Robto

Member
Licensed User
Longtime User
Thanks guys, Ill try it right away
======================
Works like a charm!! Thanks :D

Just 1 question though, how do I do this with 5 buttons. The current code switches true and false between two buttons. Sorry for asking so much.
 
Last edited:
Upvote 0

Robto

Member
Licensed User
Longtime User
I believe I have to setup a list and use the tick to 'choose' which button from the list I will show (this is how I can control the sequence as I dont want it to be random). Not sure how to realise this in code though... :sign0085:
 
Upvote 0
Top