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.
> 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