Button text blink

Posted by: fsegui on 14 July 2020, 11:31 pm EST

  • Posted 14 July 2020, 11:31 pm EST

    Hello,

    I try to make the text property of C1Button to blink. It works well with a native winform button with the following code but I cannot get it to work with C1Button. W:

    Private Sub btnBlinck(ByRef xbTrueOrFalse As Boolean)
            If xbTrueOrFalse = True Then
                If btnSave.ForeColor.Equals(System.Drawing.Color.Blue) Then Exit Sub
               
                btnSave.ForeColor = System.Drawing.Color.Blue
                tmrSave.Interval = 300
                tmrSave.Enabled = True
            Else
                If btnSave.ForeColor.equals(System.Drawing.SystemColors.ControlText) Then Exit Sub
                btnSave.ForeColor = System.Drawing.SystemColors.ControlText
                tmrSave.Enabled = False
    		End If
            System.Windows.Forms.Application.DoEvents()
        End Sub
    
     Private Sub tmrSave_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles tmrSave.Tick
            btnSave.ForeColor = IIf(btnSave.ForeColor.Equals(System.Drawing.Color.Blue), System.Drawing.SystemColors.ControlText, System.Drawing.Color.Blue)
        End Sub
    
    
  • Posted 15 July 2020, 3:58 pm EST - Updated 3 October 2022, 2:45 pm EST

    Hi Florent,

    I have attached a sample which shows blinking text in the C1Button.

    If you are doing something else as implemented in the sample then please let us know and modify the sample accordingly.

    Regards,

    Prabhat Sharma.

    BtnBlinkDemo.zip

  • Posted 15 July 2020, 7:58 pm EST

    Hi,

    Yes, I forgot to mention that the form also has a C1ThemeController on it.

    Even if I set to “none” the theme on the C1Button, it does not blink.

  • Posted 15 July 2020, 9:46 pm EST

    Hello,

    Sorry, but we did not face the issue by using C1ThemeController at our end.

    We have modified the last attached sample implementing the same, please have a look.

    Regards,

    Prabhat Sharma.

    BtnBlinkDemo_Mod.zip

  • Posted 15 July 2020, 10:06 pm EST

    Hi,

    I’ve updated the first sample with C1ThemeController. It does not work (but your second sample works)

  • Posted 15 July 2020, 10:06 pm EST

  • Posted 16 July 2020, 5:20 pm EST

    Hi Florent,

    In your last attached post, the VisualStyle property of C1Button is Custom, please change it to System to make the sample work as desired:

    Me.C1Button1.VisualStyle = C1.Win.C1Input.VisualStyle.System
    

    Regards,

    Prabhat Sharma.

  • Posted 20 July 2020, 7:25 am EST

    Hi Prabhat Sharma,

    Even if I update to System, if I set to (default) the Theme on the C1Button, it does not blink. How is it possible to apply a custom theme and make the button blink?

  • Posted 20 July 2020, 4:04 pm EST

    Hi,

    The button blinks as desired at our end when there is no theme applied.

    Please see the attached GIF.

    >>is it possible to apply a custom theme and make the button blink?

    We are discussing this with the developers and will let you know soon.

    [Internal tracking Id: 453962]

    Regards,

    Prabhat Sharma.

    Theme.zip

  • Posted 25 April 2023, 3:46 pm EST

    Hello,

    Apologies for the delay in response.

    This issue has been fixed back in 2021 builds.

    Please update your project with the latest builds to resolve this issue.

    Regards,

    Prabhat Sharma.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels