Skullcode 0 Posted September 30, 2020 can i have flashwindow effect to be applied on a VCL Tbutton Control ? Share this post Link to post
FPiette 385 Posted September 30, 2020 Use a TTimer to change the color of the button periodically. If you need a lot of them, you can derive your own TFlashingButton class/component to have an easy to use flashing button on the tool palette. 1 Share this post Link to post
Mark Williams 14 Posted October 1, 2020 AFAIK you can't change the colour or event the font colour of a standard TButton. You can derive your own button with a canvas (which I have done in the past), but its quite a lot of work and won't work decently with themes. Francois' suggestion of a timer is sound, but I would suggest internittently enabling/disabling the button to provide a flash effect/ 1 Share this post Link to post
Remy Lebeau 1436 Posted October 1, 2020 4 hours ago, Mark Williams said: AFAIK you can't change the colour or event the font colour of a standard TButton. Not by default, but you can manually enable the BS_OWNERDRAW style on it, and then intercept WM_DRAWITEM messages sent to it. Then you can make it look however you want. 4 hours ago, Mark Williams said: I would suggest internittently enabling/disabling the button to provide a flash effect Or, simply use a different Button control that supports custom coloring, like TBitBtn (which already has the BS_OWNERDRAW style) or TSpeedButton. 1 Share this post Link to post
Guest Posted October 1, 2020 You may want to have a look at AlphaSkin and its newest version, the new attention feature is very nice, before that was drawing a blinking red rectangle around the control before AS introduced that feature. https://www.alphaskins.com/showdoc.php?l=en&n=22 Share this post Link to post
David Heffernan 2354 Posted October 1, 2020 Flashing can be quite visually aggressive. It is often preferable to highlight a control in some other way. 4 Share this post Link to post
Anders Melander 1815 Posted October 1, 2020 26 minutes ago, David Heffernan said: Flashing can be quite visually aggressive. Yeah. There's a reason we don't have <BLINK> in HTML anymore. P.S. I just tried googling "blink html"... WTH? Do they think they're clever? Okay they're a bit clever because if you google "html blink" the result differs subtly. Share this post Link to post
Remy Lebeau 1436 Posted October 1, 2020 Here is another idea - instead of flashing the Button itself, place it inside a Panel whose borders appear slightly beyond the Button's edges, and then flash the Panel as needed. Or, create an alpha-blended overlay window, place it over the Button, and then hide/show the window as needed. 1 Share this post Link to post
Mike Torrettinni 198 Posted October 1, 2020 1 hour ago, Anders Melander said: Yeah. There's a reason we don't have <BLINK> in HTML anymore. If you still need it, you can achieve blinking effect with CSS: https://www.w3docs.com/learn-html/html-blink-tag.html Share this post Link to post