hello!
i'm trying to insert a picture inside a grid, i've tried with some codes that i found on the web (on similar topic) but i made a mess and ruined my code, so i decided to start over again (i'm a beginner).
that's my actual code: (there's basically nothing at the moment):
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
ExtCtrls,
Grids;
type
{ TForm1 }
TForm1 = class(TForm)
Image1: TImage;
StringGrid1: TStringGrid;
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
end.
{
Return TColor value in XXXXXX format
(X being a hex digit)
}
function
TColorToHex( Color : TColor )
: string;
begin
Result :=
{ red value }
IntToHex( GetRValue( Color ), 2 ) +
{ green value } -
IntToHex( GetGValue( Color ), 2 ) +
{ blue value }
IntToHex( GetBValue( Color ), 2 );
end;
function RGBToColor(R, G, B: Byte): TColor;
and i would like to have something like the example i've attached below.
any suggestion?
thank you very much!