Вниз
Скачать: CL | DM;

MaxLength в StringGrid   Найти похожие ветки 

← →
greengeneral   (2007-11-21 21:40) [0]

В Edit есть MaxLength, а есть ли в StringGrid, если нет тогда кто нибудь знает как ограничить кол-во символов допустимые для ввода в ячейки StringGrid. Заранее спасибо.


← →
engine ©   (2007-11-21 21:52) [1]

procedure TForm1.StringGrid1GetEditText(Sender: TObject; ACol,
 ARow: Integer; var Value: String);
begin
if Length(Value) > 10 then Delete(Value, 11, Length(Value) — 10);
end;


← →
Reindeer Moss Eater ©   (2007-11-21 21:52) [2]

Write an OnGetEditMask event handler to provide the in-place editor with an edit mask that describes the valid input strings a user can type into a cell.


← →
Reindeer Moss Eater ©   (2007-11-21 21:56) [3]

GetEditText вызывается перед началом редактирования. И не вызывается в процессе ввода.


← →
Leonid Troyanovsky ©   (2007-11-22 10:00) [4]


> engine ©   (21.11.07 21:52) [1]



procedure TForm1.StringGrid1GetEditText(Sender: TObject; ACol,
 ARow: Integer; var Value: String);
var
 h: HWND;
begin
 h := GetTopWindow((Sender as TStringGrid).Handle);
 if h <> 0 then
   FindControl(h).Perform(EM_SETLIMITTEXT, 10, 0);
end;

--
Regards, LVT.



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.014 c
15-1195307639
@!!ex
2007-11-17 16:53
2007.12.16
Как настроить "локальный" интернет?


2-1195592839
miwgun
2007-11-21 00:07
2007.12.16
пробудился интерес к scrollbar


15-1195131734
Ega23
2007-11-15 16:02
2007.12.16
Так всё-таки: как канонически правильно передавать объекты


2-1195840718
vegarulez
2007-11-23 20:58
2007.12.16
Вопрос про кол-во элементов в array[0..x] of string


2-1195478395
marik
2007-11-19 16:19
2007.12.16
изменение размеров при BorderStyle = bsNone




   Наверх