Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

StringGrid selections

1 view
Skip to first unread message

Blake Versiga

unread,
Dec 31, 1998, 3:00:00 AM12/31/98
to
How can I select or deselect a string in a string grid.

I have a need to select 1 word in a phrase or the
whole contents of a cell.

I know about SelText, SelStart, and SelLength but I can not find
and Object to apply them. The INPLACEEDITOR is available in
a TCustomGrid but I do not know how to access it from a
StringGrid Object.

Andreas Hoerstemeier

unread,
Jan 4, 1999, 3:00:00 AM1/4/99
to
In comp.lang.pascal.delphi.components.usage Blake Versiga <rst...@dallas.net> wrote:
> How can I select or deselect a string in a string grid.

> I know about SelText, SelStart, and SelLength but I can not find


> and Object to apply them. The INPLACEEDITOR is available in
> a TCustomGrid but I do not know how to access it from a
> StringGrid Object.

As TStringGrid derives from TCustomGrid it also has the inplaceeditor,
however this is a protected field of that class, so you cannot access it
directly. But with the following hack you can:

type
THackGrid=class(TStringGrid)
end;


THackGrid(Stringgrid1).InplaceEditor.SelLength:=0;

Bye,
Andy

--
Andreas Hoerstemeier
email: an...@scp.de (work)
an...@hoerstemeier.de (home)
www: http://www.hoerstemeier.com

0 new messages