I have a subclassed DesktopCanvas so I can reuse as a indicator by changing the shape and color fill
I would like to be able to enable a pulsating color scheme to indicate a “WORKING” visible clue verses a static color to indicate “OFF” non working visible clue
This will enable reducing text or other indication needs on the user interface. The fewer on screen elements creates a cleaning UI.
Is it possible to make a pulsing color fill for a DesktopCanvas and once that is accomplished add that to the subclassed DesktopCanvas?
Short answer, no. There is no colour that all by itself will pulse. You would have to have some sort of active mechanism to periodically change the colour of the canvas over time.
You could hide the canvas and display a progress bar or progress wheel or other control that would indicate the ‘progress’.
Since the OP desires to subclass DesktopCanvas anyway, this is entirely possible and quite easy to do with a subclass. Add a Timer to invalidate your Canvas at 60fps, and adjust the color slowly over time to pulsate the label color.
1 Like
Thom McGrath’s ZirconProgressIndicator has code that animates smooth color changes, you could adapt it The ZAZ: ZirconProgressIndicator
@Julia_Truchsess - ZirconProgressIndicator looks like something to use on other projects - thanks.
@Tim_Parnell - That is the direction I am going with. I have made a timer loop that changes the diameter of the canvas drawn which looks okay. I am going to add the color change to the subclassed DesktopCanvas and see what happens