![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#7
|
|||
|
|||
|
La verdad es que nunca e usado DrawGrid. Haber como me las avio para dibujar todos los datos que necesito mostrar.
Os muestro lo que llevo echo para que le echeis un vistazo. De momento solo es el esqueleto. Solo hay que incluir un StringGrid y un boton. implementation {$R *.dfm} function Min(i,j: Integer): Integer; begin if i < j then Result:= i else Result:= j; end; procedure TForm15.Button1Click(Sender: TObject); var Buffer: array[1..16] of Byte; F: File; Leidos: Integer; i,c,x: Integer; Offset: Cardinal; L:String; begin i:=0; c:=0; OpenDialog1.Execute; AssignFile(F,OpenDialog1.FileName); Filemode:= 0; {$I-} Reset(F,1); {$I+} if IOResult = 0 then begin Offset:= 0; while not Eof(F) do begin //********************** StringGrid1.Cells[i,c]:=IntToHex(Offset,8); BlockRead(F,Buffer,16,Leidos); //************************** //******************************** for i:= 1 to Min(Leidos,8) do StringGrid1.Cells[i,c]:=IntToHex(Buffer[i],2); //*********************************** //********************************** for i:= 9 to Min(Leidos,16) do StringGrid1.cells[i,c]:=IntToHex(Buffer[i],2); //*********************************** //*********************************** for i:= Min(Leidos,16) + 1 to 16 do StringGrid1.Cells[i,c]:=#32; for x:= 1 to Min(Leidos,16) do if Char(Buffer[x]) in ['A'..'Z','a'..'z','0'..'9'] then StringGrid1.Cells[i+x,c]:= Char(Buffer[x]) else StringGrid1.Cells[i,c]:='.'; StringGrid1.Cells[i,c]:='|'; inc(Offset,Leidos); inc(c); i:=0; // Va aumentado las filas segun lo necesite. StringGrid1.RowCount:=StringGrid1.RowCount+1; end; CloseFile(F); i:=0; end; end; procedure TForm15.FormCreate(Sender: TObject); begin StringGrid1.ColCount:=34; StringGrid1.DefaultColWidth:=15; StringGrid1.DefaultRowHeight:=15; StringGrid1.FixedCols:=0; StringGrid1.FixedRows:=0; StringGrid1.ColWidths[0]:=50; end; |
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Rellenar con ceros (0) | egarc | SQL | 5 | 08-10-2012 09:42:21 |
| Rellenar con 0.... | buitrago | Varios | 6 | 17-11-2011 21:02:53 |
| Buscar componentes en el IDE rapidamente | Jose Roman | OOP | 7 | 24-01-2008 12:23:06 |
| ABM Rapidamente | loxod | Varios | 12 | 10-05-2007 20:08:32 |
| Rellenar una plantilla en PDF | jcmolero | Impresión | 3 | 26-09-2005 10:30:28 |
|