Board index » cppbuilder » TStringGrid - detect changed text

TStringGrid - detect changed text


2005-06-17 06:15:59 AM
cppbuilder28
Hello Everyone,
I'm working with a TStringGrid in my application and I was hoping
somebody with more experience could point me in the right direction. I
want to know whenever the text in a cell changes.
The text in a cell can either change programmatically
(Grid->Cells[Col][Row] = "Some String"), or it can change due to the
actions of the user (user clicks in a cell and types something).
Since there is no OnChange event for the TStringGrid, where is the best
place to catch a change in a cell's text?
Thanks in advance for any hints,
Mark
 
 

Re:TStringGrid - detect changed text

"Mark Mussetter" < XXXX@XXXXX.COM >wrote in message
Quote
Since there is no OnChange event for the TStringGrid,
where is the best place to catch a change in a cell's text?
There is none.
When the user types in new text, the OnSetEditText event will be triggered
when the editor becomes hidden after typing is finished. So far, so good.
However, when the Cells property is assigned directly, there are no events
triggered, and there are no virtual methods called that you can override.
In short, there is no detectable way to be notified when the Cells property
is assigned to.
Gambit
 

Re:TStringGrid - detect changed text

Remy Lebeau (TeamB) wrote:
Quote
"Mark Mussetter" < XXXX@XXXXX.COM >wrote in message
news:42b1fa1e$ XXXX@XXXXX.COM ...


>Since there is no OnChange event for the TStringGrid,
>where is the best place to catch a change in a cell's text?


There is none.


Gambit

Ok...at least I know I have to look for another solution.
Thanks for your answer.
Mark
 

{smallsort}