943,865 Members | Top Members by Rank

Ad:
Dec 27th, 2007
0

unselecting stringgrid cells

Expand Post »
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.
Reputation Points: 10
Solved Threads: 0
Light Poster
bob on whidbey is offline Offline
32 posts
since Oct 2007
Dec 29th, 2007
0

Re: unselecting stringgrid cells

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);
Reputation Points: 10
Solved Threads: 0
Light Poster
bob on whidbey is offline Offline
32 posts
since Oct 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Pascal and Delphi Forum Timeline: Clientdatasets and MySQL
Next Thread in Pascal and Delphi Forum Timeline: How to make backups





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC