How do I make every CheckBox the same size?

I'm using hyperref \CheckBox command to add checkboxes to a document for use on screen and in print.

I'm specifying the size of the \CheckBox (as part of command definition):

\CheckBox[width=0.8em,height=0.8em]{#1}

However, when the document is compiled with pdflatex the exact height specified is not used (the width does take effect). So, some of the checkboxes are square and some are not, which looks ugly.

I've tried changing the order of parameters, using absolute dimensions (e.g. 3mm) and relative (0.5\baselineskip) without success.

-
please give a complete example to see what exactly you did. – Herbert Jan 20 '11 at 19:21

If you have another field (not necessarily another checkbox) in the same paragraph as your checkbox with a different height, all the fields will be the height of the largest one.

Example:

\documentclass{article}
\usepackage{hyperref}
\begin{document}
\begin{Form}
% These checkboxes will all have different heights.

\CheckBox[height=1in,width=1in]{Check}

\CheckBox[height=.5in,width=.5in]{Check}

\CheckBox[height=.25in,width=.25in]{Check}

%These checkboxes will all have the same (1in) height.

\CheckBox[height=1in,width=1in]{Check}
\CheckBox[height=.5in,width=.5in]{Check}
\CheckBox[height=.25in,width=.25in]{Check}

\end{Form}

\end{document}
-

Just enclose the CheckBox in an mbox.

\mbox{\CheckBox[height=.5in,width=.5in]{Stuff}}

That will prevent the height from being set by other things in the same vbox as the CheckBox.

If you want to get into the hairy details of how these heights are set, you might consider reading Knuth's TeX book.

-
+1 Nice. I didn't think of that, and apparently neither did anyone else until you came along. :) – Alan Munn Dec 24 '12 at 21:47