Ver Mensaje Individual
  #14  
Antiguo 31-05-2008
[coso] coso is offline
Miembro Premium
 
Registrado: may 2008
Ubicación: Girona
Posts: 1.678
Reputación: 0
coso Va por buen camino
Por fin....

Código Delphi [-]

type THKDBGrid = class (TDBGrid);

type THKDataLink = class (TDataLink);


Código Delphi [-]
procedure T_main.DBGrid1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
var
        t : TGridCoord;
begin
        t := DBGrid1.MouseCoord(x,y);

        if (t.x < 1) or (t.y <1) or (t.x > DBGrid1.Columns.Count) then exit;

        StaticText1.Left := X + 20;
        StaticText1.Top  := Y;

        THKDataLink(THKDBGrid(DBGrid1).DataLink).SetActiveRecord(t.y-1);       
        StaticText1.Caption := DBGrid1.Fields[t.x-1].AsString;
end;


Gracias gluglu por el enlace (desconocia lo de como acceder a propiedades y funciones protegidas)

Última edición por coso fecha: 31-05-2008 a las 15:22:28.
Responder Con Cita