Цитата
подскажите пожалуйста. как сделать таблицу стринггрид типа integer, т.е. чтобы туда можно было бы вносить только целые цифры.
Код
procedure TForm1.Button1Click(Sender: TObject);
var
I, J, K : Integer;
begin
K := 0;
with StringGrid1 do
for I := 0 to ColCount - 1 do
for J:= 0 to RowCount - 1 do
begin
K := K + 1;
Cells[I,J] := IntToStr(K);
end;
end;
Цитата
EditorMode property (TCustomGrid)
Determines whether the current cell can be edited.
Delphi syntax:
property EditorMode: Boolean;
C++ syntax:
__property bool EditorMode = {read=FEditorMode, write=SetEditorMode, nodefault};
Description
Set EditorMode to true, at runtime, to put the grid in edit mode. When EditorMode is true, the user can edit cells in the grid. When the user presses F2, EditorMode is set to true. When the user presses Enter, the value of EditorMode is toggled.
Note: EditorMode has no effect if the Options property does not include goEditing or if the Options property includes goAlwaysShowEditor.