Hello,
Is there a method to have one color per tiles ? By using the code below only the last color is applied to all tiles:
AdvSmoothTileList1.Tiles[0].TileFill.Color:= clRed ;
AdvSmoothTileList1.Tiles[1].TileFill.Color:= clLime ;
AdvSmoothTileList1.Tiles[2].TileFill.Color:= clBlue ;
AdvSmoothTileList1.Tiles[3].TileFill.Color:= clMaroon ;
For each tiles, I want a unique color and a caption.
I also tried TGDIPPictureContainer but I can't set caption to tiles.
Regards,
Ok, I resolve the issue.
I have to create a CustomVisualizer and to code a DrawTile function:
function TVisualizerAdvanced.DrawTile(_Graphe: TGPGraphics; _Rect: TGPRectF;
_Tile: TadvSmoothTile): TGPRectF;
var b: TGPSolidBrush ;
c: TColor ;
begin
Result:= Inherited DrawTile(_Graphe, _Rect, _Tile) ;
if (_Tile.Data = '0') then
c:= clRed
else if (_Tile.Data = '1') then
c:= clLime
else if (_Tile.Data = '2') then
c:= clMaroon
else
c:= clYellow ;
b:= TGPSolidBrush.Create(MakeColor(255, c));
_Graphe.FillRectangle(b, _Rect.X, _Rect.Y, _Rect.Width, _Rect.Height) ;
b.Free ;
end;