PDA

Ver la Versión Completa : error en grid


chanbert
24-01-2008, 01:38:54
Tengo un error que me sale en un listado en un grid, el cual al dar doble click se manda llamar otra ventana con los datos del registro del grid, pero al hacerlo como 25 veces , marca un error en la linea en rojo, y este evento es cuando se pasa el mouse sobre el grid, pero como comento esto es despues de que como 25 veces hago lo mismo sin ningun problema...

el mesaje es el siguiente

Proyect apli.exe raised exception class eoserror with message 'system error. code: 14 Espacio de almacenamiento insuficiente para completar esta operacion

espero alguien me pueda ayudar

procedure TJardGrid.WMMouseMove(var Msg: TWMMouse);
var
x, y : Longint;
ColRow : TGridCoord;
Rect, NewRect : TRect;
begin
if not(FHintsOn) then
begin
FWndHint.ReleaseHandle;
inherited;
exit;
end (*if*);
x := Msg.XPos;
y := msg.YPos;
ColRow := MouseCoord(x, y);
if (ColRow.X < 0) or (ColRow.Y < 0) then
begin
FWndHint.ReleaseHandle;
inherited;
exit;
end (*if*);
Rect := CellRect(ColRow.x, ColRow.y);
if ((Rect.Top >= 0) and
(Canvas.TextWidth(Cells[ColRow.x, ColRow.y]) >=
(Rect.Right - Rect.Left - 3))) then
begin
NewRect := FWndHint.CalcHintRect(300, Cells[ColRow.x,ColRow.y], nil);
Rect.Left := X;
Rect.Top := Rect.Top + RowHeights[ColRow.Y] div 2;
Rect.Right := Rect.Left + (NewRect.Right - NewRect.Left);
Rect.Bottom := Rect.Top + (NewRect.Bottom - NewRect.Top) + 3;
Rect.TopLeft := ClientToScreen(Rect.TopLeft);
Rect.BottomRight := ClientToScreen(Rect.BottomRight);
FWndHint.Color := FHintColor;
FWndHint.ActivateHint(Rect, Cells[ColRow.x, ColRow.y]);
end (*if*)
else
begin
FWndHint.ReleaseHandle;
end (*else*);
inherited;
end;