![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Господа подскажите пожалуйста как сделать чтобы в StringGrid
JTAG © (2006-05-30 22:16:00)Было возможно вводить только цифры?
Жуков Олег (2006-05-30 23:57:00) [1]Один из способов
type
THackedStringGrid = class(TCustomGrid);
SetWindowLong(
THackedStringGrid(StringGrid1).InplaceEditor.Handle,
GWL_STYLE,
ES_NUMBER or GetWindowLong(THackedStringGrid(StringGrid1).InplaceEditor.Handle, GWL_STYLE)
);
JTAG (2006-05-30 23:00:00) [2]Спасибо!
Kolan (2006-05-30 22:33:00) [3]Вот блин. НАписал минт 10 назад:
procedure TForm1.StringGrid1KeyPress(Sender: TObject; var Key: Char);
begin
if not Key in ['0'..'9'] then
Key := #0;
end;
Компилю - [Error] Unit1.pas(28): Operator not applicable to this operand type
Весь хелп перерыл... Скобочки .....
Gydvin (2006-05-30 22:27:00) [4]
procedure TForm1.StringGrid1KeyPress(Sender: TObject; var Key: Char);
begin
if not (key in ['0'..'9']) then key:=#0
end;