Ver Mensaje Individual
  #3  
Antiguo 26-08-2013
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola tiammat.

Estaba terminando un ejemplo similar y aunque ya lo solucionaste lo agrego por si hay alguna parte que te pueda servir.
Código Delphi [-]
var
  vHints : array of array of string;

procedure TForm1.FormCreate(Sender: TObject);
var
  c,f: Integer;
begin
  Application.HintColor    := clRed;
  Screen.HintFont.Color    := clWhite;
  Screen.HintFont.Name     := 'Times New Roman';
  Screen.HintFont.Style    := [fsBold];
  Application.HintPause    := 300;
  Application.HintHidePause:= 3000;
  with StringGrid1 do
  begin
    // algunos datos...
    for c := 0 to ColCount - 1 do
      for f := 0 to RowCount -1 do
        Cells[c,f] := IntToStr(c+f);
    // algunos mensajes
    for c := 0 to ColCount -1 do
      for f := 0 to Rowcount -1 do
      begin
        SetLength(vHints, Length(vHints)+1, Length(vHints)+1);
        vHints[c,f] := Format(' Ud. está posicionado en: %s columna %d, fila %d ',
          [#10#13, c, f]);
      end;
    ShowHint := True;
  end;
end;

procedure TForm1.StringGrid1MouseMove(Sender: TObject; Shift: TShiftState;
  X, Y: Integer);
var
  aCol, aRow : integer;
begin
  with TStringGrid(Sender) do
  begin
    MouseToCell (X, Y, aCol, aRow);
    if(aCol >= 0) and (aRow >= 0) and (Hint <> StringGrid1.Cells[aCol,aRow]) then
    Hint := vHints[aCol,aRow];
  end
end;

Saludos.

Edito: Lo del hint es por que creí leer "Hint colorado" en lugar de "TStringGrid coloreado"... (no si ando mejor...)
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....

Última edición por ecfisa fecha: 26-08-2013 a las 21:24:11.
Responder Con Cita