That was a good idea unfortunately SelLength isn't a Property of TStringGrid (at least with CB5). With CB5 SelLength is only in TEdit, TComboBox and TRichEdit.
Maybe its included with TStringGrid on newer compilers?
Thanks,
Here is the code I was using:
void __fastcall TfrmMain::sgSREGSetEditText(TObject *Sender, int ACol, int ARow, const AnsiString Value)
{
int temp;
// Check S-REG values are in range.
if( ACol == SREG_COL_VALUE ) {
// Ensure value is decimal.
temp...
Im using the OnSetEditText event to verify text changes. If something invalid is entered I change the text to a valid value.
The problem is when I change the value, the new value is then highlighted. So if another key press occurs this value gets overridden.
I thought maybe if the TStringGrid...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.