with Canvas
do
if beginscene
then
begin
font.Style := [ tfontstyle.fsBold ];
font.Size := fx * 0.85;
s := TListBoxItem( Sender ).Text;
r := rectf( ARect.left + ( sx
shr 2 ), ARect.top, ARect.Width - 1,
ARect.Height - 1 );
fill.Color := s1 - $00040404;
fill.Gradient.Color := s1 + $00040404;
fill.Kind := tbrushkind.Gradient;
fill.Gradient.Style := tgradientstyle.Linear;
fillrect( r, 3, 3, [ tcorner.TopLeft, tcorner.TopRight,
tcorner.BottomLeft, tcorner.BottomRight ], 0.85 );
r.top := ARect.top + 1;
r.Height := ARect.Height * 0.5;
fill.Color := s3;
filltext( r, s, true, 0.95, [ ], ttextalign.Center,
ttextalign.Center );
if assigned( Sender )
and
( TListBoxItem( Sender ).ItemData.Detail <> '
' )
then
begin
if TListBoxItem( Sender ).Text.EndsWith( '
\' )
then
t := TListBoxItem( Sender ).ItemData.Detail + '
' +
TListBoxItem( Sender ).Hint
else
begin
try
z := TListBoxItem( Sender ).ItemData.Detail.Split( [ '
' ] );
except
on e :
exception do
doalert( er + #32 +
ec + pt, ok );
end;
if ( length( z ) > 1 )
and not z[ 2 ].IsEmpty
then
t := z[ 0 ] + '
' + z[ 1 ] + '
' +
sts( z[ 2 ].Replace( '
.', '
' ).ToInt64 ) + #13 +
TListBoxItem( Sender ).Hint
else
t := er + #13 + TListBoxItem( Sender ).Hint
end
end;
r := rectf( ARect.left + ( sx
shr 2 ), ARect.top + ARect.Height *
0.5 + 1, ARect.Width - 1, ARect.Height - 1 );
fill.Color := s3;
filltext( r, t, true, 0.95, [ ], ttextalign.Center,
ttextalign.Center );
endscene;
end;