Ver Mensaje Individual
  #15  
Antiguo 31-05-2008
Avatar de micky mouse
micky mouse micky mouse is offline
Miembro
 
Registrado: nov 2006
Ubicación: TRUJILLO - PERU
Posts: 24
Reputación: 0
micky mouse Va por buen camino
Holas michachos

les agradesco su ayuda, gluglu pusites el toque en este tema, y coso te agradesco este ultimo esfuerzo encontrando el codigo correcto que necesitaba, yo no puede llegar, supongo que me falta aprender un poco mas de teoria sobre propiedades y como manejarlas. si pueden enviarme algun enlace interesante al respecto se los agradeceria.

GRACIAS TOTALES.

Código Delphi [-]
type THKDBGrid = class (TDBGrid);
type THKDataLink = class (TDataLink);






Código Delphi [-]
procedure TFrm_Contabilidad_Cuentas.g_MovimientoMouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
var
t : TGridCoord;
p : string;
begin
if (X=0)or(Y=0) then
m_Comentario.Visible:=false;
t := g_Movimiento.MouseCoord(X,Y);
if (t.x < 0) or (t.y < 0) or (t.x > g_Movimiento.Columns.Count) then begin
m_Comentario.Visible:=false;
exit;
end;
if Frm_Contabilidad_Cuentas.Width>X+197 then begin
m_Comentario.Left := X+5;
m_Comentario.Top := Y+182;
end else begin
m_Comentario.Left := X+5-185;
m_Comentario.Top := Y+182;
end;
if t.X>1 then begin
if t.Y<=0 then exit;
THKDataLink(THKDBGrid(g_Movimiento).DataLink).SetActiveRecord(t.y-1);
p := g_Movimiento.Fields[t.x-1].AsString;
if p<>''then begin
m_Comentario.Visible:=true;
m_Comentario.Lines.Text:=p;
end else
m_Comentario.Visible:=false;
end;
end;





este codigo es producto de sus aportes, hace que aparesca un memo como si fuera un comentario a la altura del puntero del mouse como si fuera un comentario en excel. esté desaparece si la celda esta vacia o si sale del ambito del grid. mi modesto aporte.
Responder Con Cita