Прежде чем задать вопрос, смотрите FAQ.
Рекомендуем загрузить DRKB.
| Sancho |
18.03.2006 10:59
Сообщение
#1
|
|
Новичок ![]() Группа: Пользователи Сообщений: 10 Пол: Мужской Репутация: 0 |
Доброго времени суток!
подскажите пожалуйста. как сделать таблицу стринггрид типа integer, т.е. чтобы туда можно было бы вносить только целые цифры. И еще один вопрос. как програмно сделать блокировку реактирования сей таблицы? разрешение. знаю, можно делать слеующим образом: Цитата stringgrid1.Options:=stringgrid1.Options+[goediting]; интересует именно запрет. спасибо большое |
![]() ![]() |
| Ozzя |
18.03.2006 11:18
Сообщение
#2
|
![]() Гуру ![]() ![]() ![]() ![]() ![]() Группа: Пользователи Сообщений: 1 220 Пол: Мужской Репутация: 16 |
Цитата подскажите пожалуйста. как сделать таблицу стринггрид типа 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. |
Sancho Stringgrid 18.03.2006 10:59
мисс_граффити
Доброго времени суток!
подскажите пожалуйста.... 18.03.2006 11:30![]() ![]() |
|
Текстовая версия | 10.12.2025 22:32 |