if ((Idx = 1) or (Idx mod 10 = 0) or (Idx = FPosInfo.LineCount)) then
DrawText(Canvas.Handle, PChar(StrNum), Length(StrNum), R, DT_VCENTER or DT_RIGHT)
else if (Idx mod 5 = 0) then
DrawText(Canvas.Handle, PChar('--' + #0 ), 2, R, DT_VCENTER or DT_RIGHT)
else
DrawText(Canvas.Handle, PChar('-' + #0 ), 1, R, DT_VCENTER or DT_RIGHT)