Home > Back-end >  Questions about stringgrid cell in operation
Questions about stringgrid cell in operation

Time:10-07

How a cell in a stringgrid implementation: when the input characters are Numbers of prompting please enter the number and the number of characters cannot be displayed in the cell.

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 cell

CodePudding 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
  • Related