Thanks, Nigel!
I've got something working that will do until I have more time to go deeper.
I kinda used the first method. I could not figure out how to code for "U+2605" and all I could find on the internet was really deep, involved coding. I ended up copying and pasting the star into my unit as a constant (const _star = '#9733;';) and saving the unit with UTF8 encoding.
In my grid load, I use the following
x := TheGrid.AppendImage;
TheGrid.ImageFileName[x] := sl[i];
if (sbtnToggleRatingMode.Down) and (ckbShowImageRatingOnGrid.Checked) then
begin
ia.FileName := ExtractFileName(sl[i]);
TheGrid.ImageTopText[x] := ia.SeqNo;
TheGrid.ImageBottomText[x] := GetFileStars(sl[i]);
end;
function TfrmAssetCurator.GetFileStars (sFile: String): String;
var cds: TClientDataSet;
ia: TImageAsset;
begin
cds := FRollData.FetchCDS ('FlagAndTag');
ia := TImageAsset.Create(sFile);
with cds do
begin
Filter := 'filename=' + QuotedStr(ia.MasterName);
Filtered := True;
Result := ShowStars (FieldByName('rating').AsString);
Filtered := False;
end;
FreeAndNil(ia);
end;
function TfrmAssetCurator.ShowStars (sIn: String): String;
var z: Integer;
i: Integer;
begin
Result := '';
if (sIn = '') or (sIn = '0') then
begin
Exit;
end
else
begin
i := StrtoInt(sIn);
for z := 1 to i do
begin
Result := Result + _star;
end;
end;
end;
Here's a screenshot of the result
Cheers, and thanks again,
Skip