[Solved] RadioButton.Color only changes hover color lazarus / 21-General ---------------------------------------------------------------------- nikel · 2025-01-03 13:39 Hello, I have 100 panels and 6 radio buttons in each of them. I want to change color, background color or highlight a single radio button (not the selection). Here's my code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i TRadioButto n(FPanels[I].Controls[Answers^.UserAnswerNum()]).Color:=clRed; This only works when mouse hover. How can I set color of a radio button? ---------------------------------------------------------------------- lainz · 2025-01-03 13:42 Try using a custom drawn radio button. For example in bgracontrols there's the svg theme for radio button. You change the theme and you can change the color... ---------------------------------------------------------------------- nikel · 2025-01-03 13:43 Thanks for the quick reply. ---------------------------------------------------------------------- nikel · 2025-01-04 07:36 I don't want to use 3rd party solution. Is there any other way to mark radio buttons? ---------------------------------------------------------------------- cdbc · 2025-01-04 08:40 Hi I have an idea... The radiobuttons are placed on a panel, right?!? So my thinking is, why not use the panel's 'canvas' to paint a green line under the selected radiobutton, I mean the radiobutton's 'ON/OFF' is a boolean, so one can run over them in the panel's 'OnPaint' and 'Greenlight' the chosen one. With a bit of math to figure out the position of the line, it could work nicely =^ Just a thought  Regards Benny ---------------------------------------------------------------------- nikel · 2025-01-04 08:59 Thank you sir/madam. That's a good idea. ---------------------------------------------------------------------- cdbc · 2025-01-04 09:25 Hi It's Sir  ...no worries... Have fun Benny