Hi Stefan
You could custom draw the cell, but probably the easiest way is simply to pad the text to the width of the cell.
procedure TMainForm.ImageEnMView1GetTextEx(Sender: TObject; Index: Integer; Position: TIEMTextPos; var Text: WideString; Font: TFont; var
BackgroundStyle: TBrushStyle; var BackgroundColor: TColor; var TruncSide: TIEMTruncSide);
var
iTextWidth: Integer;
aBMP: TBitmap;
begin
BackgroundColor := clRed;
BackgroundStyle := bsSolid;
// Expand text to width of the thumbnail cell
aBMP := TBitmap.create;
aBMP.Canvas.Font.Assign( Font );
iTextWidth := aBMP.Canvas.TextWidth( ' ' + Text + ' ' );
while iTextWidth < ImageEnMView1.ThumbWidth - 2 * ImageEnMView1.TextMargin - 2 * ImageEnMView1.HorizBorder do
begin
Text := ' ' + Text + ' ';
iTextWidth := aBMP.Canvas.TextWidth( ' ' + Text + ' ' );
end;
aBMP.Free;
end;
Nigel
Xequte Software
www.xequte.com
nigel@xequte.com