![]() |
![]() |
![]() |
![]() |
![]() |
FTP | ![]() |
![]() |
CCD | ![]() |
![]() |
Buscar | ![]() |
![]() |
Trucos | ![]() |
![]() |
Trabajo | ![]() |
![]() |
Foros | ![]() |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#8
|
|||
|
|||
Por fin, solucionado.
Es curioso, pero de esta forma me da error. procedure TForm1.DBGrid1KeyPress(Sender: TObject; var Key: Char); begin if DBGrid1.Fields[DBGrid1.SelectedIndex]=(DBGrid1.DataSource.DataSet.FieldByName('Author')) then begin if DBGrid1.Controls[0] is TInPlaceEdit then with DBGrid1.Controls[0] as TInPlaceEdit do begin if (GetTextLen >= MaxLongComment) and (Key <> #8) then begin Key := #0; ShowMessage('Máxima longitud alcanzada'); end; end; end; end; Y de la siguiente forma, funciona: Columna:=DBrejilla.SelectedIndex; // Averigua numero de columna posicionada. if columna=1 then begin if dbrejilla.Controls[0] is TInPlaceEdit then with dbrejilla.Controls[0] as TInPlaceEdit do begin if (GetTextLen >= 20) and (Key <> #8) then begin Key := #0; ShowMessage('Máxima longitud alcanzada'); end; end; end; Perdon por la indentación, pero no logro que se respete. Gracias a todos y en especial a nlsgarcia. Última edición por dvd2000 fecha: 08-12-2012 a las 15:19:59. |
|
|
![]() |
||||
Tema | Autor | Foro | Respuestas | Último mensaje |
Delphi for PHP y DBgrid | dante148 | Internet | 1 | 04-10-2011 22:56:15 |
DbGrid en Delphi 7 | drakkon | Varios | 3 | 27-12-2007 04:42:08 |
Delphi for php- dbgrid | omarifr | PHP | 2 | 12-10-2007 17:02:54 |
DBGrid en delphi 5 | ibbeth | SQL | 1 | 03-01-2006 02:38:05 |
Delphi + MySQL (DBGrid) | gringo | Conexión con bases de datos | 5 | 23-10-2004 04:44:31 |
![]() |
|