[Tex/LaTex] Centering part entries in toc using memoir

horizontal alignmentmemoirpartstable of contents

I'm using memoir for a large document and want to center the toc entries corresponding to parts (page entries are turned off). I read the manual (specifically pp. 161-166) and while I have no problem adjusting the positions of the part number or title separately, I can't figure out how to center the part number and the title together as a whole. The MWE that demonstrates this is as follows:

\documentclass{memoir}

\cftpagenumbersoff{part}

\begin{document}
\tableofcontents*
\part{Part A}
\chapter{Chapter a}
\end{document}

To be more specific, I would like "I Part A" to be horizontally centered. If there were a second part called "B", I would like that to be centered like "II Part B".

Best Answer

Hmm, that can be done with much shorter code:

\makeatletter
\renewcommand\partnumberline[1]{\hfil\hspace\@tocrmarg #1~}
\makeatother

(not entirely sure why though, it's late ...)