When using labelled nodes (e.g. for a flow chart), their sizes are automatically chosen. One can enforce the same size, which must be known a priori, for multiple nodes by using "large enough" values for minimum height and minimum width.
In the following example the node width is restricted for spacial reasons. This leads to the boxes containing different numbers of lines and therefore different box sizes.
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{frame}
\begin{tikzpicture}[node distance=2cm]
\node[rectangle,text width=5em,draw=black] (leftnode) {Short text};
\node[rectangle,text width=5em,draw=black,right=of leftnode] (rightnode) {A text longer than the other one};
\end{tikzpicture}
\end{frame}
\end{document}
Given two strings, that shall be written in two separate nodes of equal size: Is it possible to let LaTeX calculate the minimal node height that is large enough for both cases and use it as a parameter for the nodes?


\heightofalone does not do the trick, because the macro may not contain\\. Any ideas? – Tim Sep 12 '12 at 19:30\\. Best if you update the question and compose a fully compilable MWE that illustrates the exact problem. – Peter Grill Sep 12 '12 at 19:46\\, which gives an error when it is used inside your example.I changed the question now.
– Tim Sep 12 '12 at 20:37