CodePudding user response:
Close StringGrid edit attributes, and then click event, get the current cell, then get the location of the corresponding cell, a new MaskEdit on this position, in MaskEdit after input the number, the digital display to the current cellCodePudding user response:
StringGrid embedded editor (TInplaceEdit) is a MaskEdit, so the realization of the simple way is to open StringGrid goEditing options:StringGrid1 - & gt; The Options=StringGrid1 - & gt; The Options & lt; & lt; GoEditing;
Then in StringGrid OnGetEditMask event processing:
void __fastcall TForm1: : StringGrid1GetEditMask (TObject * Sender, int ACol,
Int ARow, AnsiString & amp; Value)
{
Value="HTTP://https://bbs.csdn.net/topics/! 99999; 1; ";//assume that allowed to enter up to five digits
}
CodePudding user response:
I went back to try!CodePudding user response:
Haven't got the watch, there is also a EditMask, it's much more easy