unselecting stringgrid cells

Please support our Pascal and Delphi advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2007
Posts: 20
Reputation: bob on whidbey is an unknown quantity at this point 
Solved Threads: 0
bob on whidbey bob on whidbey is offline Offline
Newbie Poster

unselecting stringgrid cells

 
0
  #1
Dec 27th, 2007
The upper-left corner cell of a stringgrid has a blue background - I believe because it is selected. I don't want any cells "selected". The solutions to this problem that I've seen have the user modify the DrawCell procedure.

But I'm using a TtntStringGrid component in order to get Unicode for several languages and I don't have the DrawCell procedure that prints the text.

Isn't there a simple way to deselect all cells, and thus get rid of this problem? I think I found the answer to this problem with my prior version of Delphi, but I haven't been able to find it in the latest D2007 version that I have.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 20
Reputation: bob on whidbey is an unknown quantity at this point 
Solved Threads: 0
bob on whidbey bob on whidbey is offline Offline
Newbie Poster

Re: unselecting stringgrid cells

 
0
  #2
Dec 29th, 2007
This seems to work fine
Pascal and Delphi Syntax (Toggle Plain Text)
  1.  
  2. var Rect: TRect;
  3. begin
  4. SetRect(Rect, -1, -1, -1, -1);
  5. MyGrid.Selection := TGridRect(Rect);
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Pascal and Delphi Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC