Recent

Author Topic: [RESOLVED] How to change colour of the StringGrid selected cell  (Read 13488 times)

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Hello,

As you certainly know, when you click on a TStringGrid, the selected cell is barely visible. That's why I would like to change its colour from white to blue when I click on it. The colour should then become white again when the focus is set on a different object.

Do you know how to do it?

Thanks in advance.
« Last Edit: March 19, 2012, 06:43:42 pm by pasquale »
Apple loves breaking backward compatibility to make money. If you want to be sure that your apps will never stop working, use Windows and trash macOS!

tomek

  • Jr. Member
  • **
  • Posts: 85
Re: How to change colour of the StringList selected cell
« Reply #1 on: March 19, 2012, 05:25:46 pm »
you mean StringGrid ?

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Re: How to change colour of the StringList selected cell
« Reply #2 on: March 19, 2012, 05:49:37 pm »
You're right. Sorry for my mistake.
Apple loves breaking backward compatibility to make money. If you want to be sure that your apps will never stop working, use Windows and trash macOS!

tomek

  • Jr. Member
  • **
  • Posts: 85
Re: How to change colour of the StringList selected cell
« Reply #3 on: March 19, 2012, 05:52:53 pm »
StringGrid1.SelectedColor:=clBlue;
StringGrid1.Options := StringGrid1.Options + [goDrawFocusSelected];

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Re: How to change colour of the StringList selected cell
« Reply #4 on: March 19, 2012, 06:04:17 pm »
THANK YOU!
Apple loves breaking backward compatibility to make money. If you want to be sure that your apps will never stop working, use Windows and trash macOS!

 

TinyPortal © 2005-2018