Flashing text in buttons

cdeane

Member
I need some basic code to make the text in my buttons to flash on and off.
Ex: blue to red and back every second.
 

taximania

Well-Known Member
Licensed User
Here's a start. I'm sure using one of the libraries you can adjust the Border colours.

B4X:
Sub Globals
   'Declare the global variables here.
   flag=0
End Sub

Sub App_Start
   Form1.Show
   button1.FontColor=cred
   timer1.Enabled=true
End Sub


Sub Timer1_Tick
   If flag=0 Then
   button1.FontColor=cblue
   flag=1
   Return
   End If
   If flag=1 Then
   button1.FontColor=cred
   flag=0
   Return
   End If
   

End Sub
 

taximania

Well-Known Member
Licensed User
Small modification for developers who like short code:
I hate If ... Else ... 1 liners.
They never work for me :eek:
 

taximania

Well-Known Member
Licensed User
Ha ha ha, try some beer .....:sign0060:

;) Hi Paulo
 
Top