在自定义函数摘要中处理NaN值

问题描述

我具有自定义功能,我想用“ 0.0”替换NaN和Na值 什么是最简单的解决方案。

procedure 
TPhotoX.FormCreate(Sender: 
TObject);
var
 FilesN: String;
 S: TBitmap;
 Cir: TCircle;
begin
  FlowLayout1.DeleteChildren;
  GetFP:= TDirectory.GetFiles(GetPathIma,'*jpg',TSearchOption.sotopDirectoryOnly);

for FilesN in GetFP do
VertScrollBox1.BeginUpdate;
Cir.TCircle.Create(Self);
Cir.Parent:= FlowLayOut1;  
Cir.Fill.Bitmap.WrapMode:=TWrapMode.TileOriginal;
Cir.Fill.Kind:= TBrushkind.Bitmap;
Cir.Height:= 85;
Cir.Width:= 85;

//...more circle's properties next including the Circle's Tag property that i ignore to implement
// Sorry i'm Delphi's Beginner but Delphi's power believer too!!! :-)

Cir.OnClick: CirClick;
try
S.TBitmap.Create;
FlowLayout1.Addobject(Cir);
S.LoadThumbnailsFromFile(FilesN,150,150);
Cir.Fill.Bitmap.Bitmap:=S;
Cir.Repaint;
VertScrollBox1.EndUpdate;
finally
S.Free;
end;
end;

//in the code above,how i can to assign differents tags for each circle for referencing later with this handler:

procedure TPhotoX.CirClick(Sender:TObject);
begin
 case TCircle(Sender).Tag of
 1: //event to show the image 
 inside the circle
 2: // event to show another 
image inside the circle
 end;
end;
end; 

我已经尝试过了,但是没用

解决方法

这是您想要的吗?

summ_tab1[1,1:4] <- "0.0"