Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TStringGrid - OnStartEdit, OnStopEdit

Status
Not open for further replies.

Nordlund

Programmer
Jul 17, 2001
458
SE
Hi there.

Has anyone written code to check out when a StringGrid go into/out to/from Edit mode...



//Nordlund
 
Maybe by using the OnGetEditText and SetEditText events of the Grid, you can get what you want ?

SetEditText is called everytime the contents of the cell changes, and when you leave the edited cell, so you'd have to fiddle something there ...

hth

- fruNNik

 
Yeps.. That was one om my solution, but the trick is to know when SetEditText should fire OnEndEdit. (A little bit tricky there, if even possible).

Another apporach is to make a TInplaceEdit, and fire events from this object.

I tried to override a visible change event, but then, my Grid threw an exception "like hell". (I tried to use CMShowingChanged, but with no luck)...

//Nordlund
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top