Ver Mensaje Individual
  #2  
Antiguo 31-07-2015
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 P-programador.

En primer término te sugiero que leas como se debe formular una consulta aquí. Por favor, leelo.

Contesto al título con un ejemplo:
Código Delphi [-]
...
implementation

var
  ORect: TRect;

procedure TForm1.FormCreate(Sender: TObject);
var
  i: Integer;
begin
  Image1.Width := 33;
  Image1.Height:= 33;
  Image1.Visible := False;
  for i := StringGrid1.FixedCols to StringGrid1.ColCount-1 do
    StringGrid1.ColWidths[i] := 33;
  for i := StringGrid1.FixedRows to StringGrid1.RowCount-1 do
    StringGrid1.RowHeights[i] := 33;
  ORect := StringGrid1.CellRect(StringGrid1.FixedCols, StringGrid1.FixedRows);
end;

procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
var
  sg: TStringGrid;
begin
  sg := TStringGrid(Sender);
  sg.Canvas.FillRect(Rect);
  if (Rect.Left = ORect.Left)and(Rect.Top = ORect.Top) then
    sg.Canvas.Draw(ORect.Left, ORect.Top, Image1.Picture.Bitmap);
end;

procedure TForm1.StringGrid1SelectCell(Sender: TObject; ACol,
  ARow: Integer; var CanSelect: Boolean);
begin
  ORect := StringGrid1.CellRect(ACol, Arow);
end;

Salida:


Saludos y gracias por tu colaboración
__________________
Daniel Didriksen

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