Q:

Tikz: Equal sized nodes with different text

I am new here to Tikz and I need to draw 2 rows of nodes that are identical in size but having different text of different length in it. Sure the upper and lower nodes should have enough room for the longest of the two texts. The upper nodes should be aligned to the lower ones and have the same size.
To be specific, I need to draw the following picture using Tikz:

A:

You can use a tikz matrix which simplifies the placement, and creation of node markers, and then \draw the boxes after:

Code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc,matrix}

% http://tex.stackexchange.com/questions/33703/extract-x-y-coordinate-of-an-arbitrary-point-in-tikz
\newdimen\XCoordA
\newdimen\XCoordB
\newdimen\YCoordA
\newdimen\YCoordB
\newcommand{\ExtractMinX}[3]{%
    % #1 = csname to hold min x value
    % #2 = coordinate 1
    % #3 = coordinate 2
    \path (#2); \pgfgetlastxy{\XCoordA}{\YCoordA};%
    \path (#3); \pgfgetlastxy{\XCoordB}{\YCoordB};%
    \ifdim\XCoordA<\XCoordB
        \edef#1{\XCoordA}%
    \else
        \edef#1{\XCoordB}%
    \fi
}%
\newcommand{\ExtractMaxX}[3]{%
    % #1 = csname to hold max x value
    % #2 = coordinate 1
    % #3 = coordinate 2
    \path (#2); \pgfgetlastxy{\XCoordA}{\YCoordA};%
    \path (#3); \pgfgetlastxy{\XCoordB}{\YCoordB};%
    \ifdim\XCoordA>\XCoordB
        \edef#1{\XCoordA}%
    \else
        \edef#1{\XCoordB}%
    \fi
}%

\tikzset{My Matrix Node Style/.style={every node/.style={draw=none, minimum height=5ex, anchor=base, row sep=15.0ex, column sep=5.0em}}}

\begin{document}
\begin{tikzpicture}
\pgfsetmatrixcolumnsep{2.0em}
\matrix (M) [matrix of nodes, My Matrix Node Style] {
    Small & Medium & Larger Text & Even Larger Text \\[2.0ex]
    Even larger text & Larger Text & Medium & Small \\
};
% Now draw the boxes based on the min and max x value for each column
\foreach \x in {1,...,4} {% for each column
    \ExtractMinX{\MinX}{M-1-\x.south west}{M-2-\x.south west}%
    \ExtractMaxX{\MaxX}{M-1-\x.north east}{M-2-\x.north east}%
    \foreach \y in {1,...,2} {% for each row
        \coordinate (Left Bottom) at (\MinX,\YCoordA |- M-\y-\x.south west);
        \coordinate (Right Top) at   (\MaxX,\YCoordB |- M-\y-\x.north east);
        \draw [red, rounded corners=3pt, thick]
            (Left Bottom) rectangle (Right Top);
    }
}
\end{tikzpicture}
\end{document}

A:

A possible TikZ free solution with automatic width calculation and allowing multi-line texts (a TikZ solution is below):

The command \EightTexts has eight mandatory arguments and LaTeX performs all necessary calculations using simple conditional tests on the length of the corresponding strings. The code in the image was produced using
\EightTexts{Small}{Medium}{Large}{Larger}{AA}{Even larger}{B}{The largest}

\vskip1cm

\EightTexts{AAAA}{B}{CCCCC}{DD}{EEEEEEEEE}{FFFFF}{GG}{HHHHHHHH}

The complete code:
\documentclass{article}
\usepackage{varwidth}

\newlength\mylenai
\newlength\mylenbi
\newlength\mylenMaxi
\newlength\mylenaii
\newlength\mylenbii
\newlength\mylenMaxii
\newlength\mylenaiii
\newlength\mylenbiii
\newlength\mylenMaxiii
\newlength\mylenaiv
\newlength\mylenbiv
\newlength\mylenMaxiv

\newsavebox\myboxi
\newsavebox\myboxii
\newsavebox\myboxiii
\newsavebox\myboxiv
\newsavebox\myboxv
\newsavebox\myboxvi
\newsavebox\myboxvii
\newsavebox\myboxviii

\newcommand\TikZEightTexts[8]{%
% Save the texts in boxes so we can measure their widths. 
\savebox\myboxi{\begin{varwidth}{\textwidth}#1\end{varwidth}}
\savebox\myboxii{\begin{varwidth}{\textwidth}#2\end{varwidth}}
\savebox\myboxiii{\begin{varwidth}{\textwidth}#3\end{varwidth}}
\savebox\myboxiv{\begin{varwidth}{\textwidth}#4\end{varwidth}}
\savebox\myboxv{\begin{varwidth}{\textwidth}#5\end{varwidth}}
\savebox\myboxvi{\begin{varwidth}{\textwidth}#6\end{varwidth}}
\savebox\myboxvii{\begin{varwidth}{\textwidth}#7\end{varwidth}}
\savebox\myboxviii{\begin{varwidth}{\textwidth}#8\end{varwidth}}
% Choose maximum width between width of first box and fifth box
% store the maximum in `\mylenMaxi`
\setlength\mylenMaxi{\the\wd\myboxi}%
\setlength\mylenai{\the\wd\myboxi}%
\setlength\mylenbi{\the\wd\myboxv}%
\ifdim\mylenbi>\mylenai\relax
  \setlength\mylenMaxi{\mylenbi}
\fi
% Choose maximum width between the width of second box and the 
% width of sixth box; store the maximum in `\mylenMaxii`
\setlength\mylenMaxii{\the\wd\myboxii}%
\setlength\mylenaii{\the\wd\myboxii}%
\setlength\mylenbii{\the\wd\myboxvi}%
\ifdim\mylenbii>\mylenaii\relax
  \setlength\mylenMaxii{\mylenbii}
\fi
% Choose maximum width between the width of third box and the 
% width of seventh box; store the maximum in `\mylenMaxiii`
\setlength\mylenMaxiii{\the\wd\myboxiii}%
\setlength\mylenaiii{\the\wd\myboxiii}%
\setlength\mylenbiii{\the\wd\myboxvii}%
\ifdim\mylenbiii>\mylenaiii\relax
  \setlength\mylenMaxiii{\mylenbiii}
\fi
% Choose maximum width between the width of fourth box and the 
% width of eighth box; store the maximum in `\mylenMaxiv`
\setlength\mylenMaxiv{\the\wd\myboxiv}%
\setlength\mylenaiv{\the\wd\myboxiv}%
\setlength\mylenbiv{\the\wd\myboxviii}%
\ifdim\mylenbiv>\mylenaiv\relax
  \setlength\mylenMaxiv{\mylenbiv}
\fi
\noindent
\fbox{\parbox[c][1.2cm][c]{\mylenMaxi}{\centering#1}}\hfill
\fbox{\parbox[c][1.2cm][c]{\mylenMaxii}{\centering#2}}\hfill
\fbox{\parbox[c][1.2cm][c]{\mylenMaxiii}{\centering#3}}\hfill
\fbox{\parbox[c][1.2cm][c]{\mylenMaxiv}{\centering#4}}%
\bigskip\par\noindent
\fbox{\parbox[c][1.2cm][c]{\mylenMaxi}{\centering#5}}\hfill
\fbox{\parbox[c][1.2cm][c]{\mylenMaxii}{\centering#6}}\hfill
\fbox{\parbox[c][1.2cm][c]{\mylenMaxiii}{\centering#7}}\hfill
\fbox{\parbox[c][1.2cm][c]{\mylenMaxiv}{\centering#8}}\par
}

\begin{document}

\TikZEightTexts{Small}{Medium}{Large}{Larger}{AA}{Even larger}{B}{The 3 lines\\largest solution\\ever}

\vskip1cm

\TikZEightTexts{AAAA \\ AAAAAAAA \\ AAA}{B}{CCCCC}{DD}{EEEEEEE}{FFFFF}{GG \\ GGG }{HH \\ HH}

\end{document}

A solution using TikZ has been required in comments; here it is:
\documentclass{article}
\usepackage{varwidth}
\usepackage{tikz}
\usetikzlibrary{positioning}

\newlength\mylenai
\newlength\mylenbi
\newlength\mylenMaxi
\newlength\mylenaii
\newlength\mylenbii
\newlength\mylenMaxii
\newlength\mylenaiii
\newlength\mylenbiii
\newlength\mylenMaxiii
\newlength\mylenaiv
\newlength\mylenbiv
\newlength\mylenMaxiv

\newsavebox\myboxi
\newsavebox\myboxii
\newsavebox\myboxiii
\newsavebox\myboxiv
\newsavebox\myboxv
\newsavebox\myboxvi
\newsavebox\myboxvii
\newsavebox\myboxviii

\newcommand\TikZEightTexts[8]{%
% Save the texts in boxes so we can measure their widths. 
\savebox\myboxi{\begin{varwidth}{\textwidth}#1\end{varwidth}}
\savebox\myboxii{\begin{varwidth}{\textwidth}#2\end{varwidth}}
\savebox\myboxiii{\begin{varwidth}{\textwidth}#3\end{varwidth}}
\savebox\myboxiv{\begin{varwidth}{\textwidth}#4\end{varwidth}}
\savebox\myboxv{\begin{varwidth}{\textwidth}#5\end{varwidth}}
\savebox\myboxvi{\begin{varwidth}{\textwidth}#6\end{varwidth}}
\savebox\myboxvii{\begin{varwidth}{\textwidth}#7\end{varwidth}}
\savebox\myboxviii{\begin{varwidth}{\textwidth}#8\end{varwidth}}
% Choose maximum width between width of first box and fifth box
% store the maximum in `\mylenMaxi`
\setlength\mylenMaxi{\the\wd\myboxi}%
\setlength\mylenai{\the\wd\myboxi}%
\setlength\mylenbi{\the\wd\myboxv}%
\ifdim\mylenbi>\mylenai\relax
  \setlength\mylenMaxi{\mylenbi}
\fi
% Choose maximum width between the width of second box and the 
% width of sixth box; store the maximum in `\mylenMaxii`
\setlength\mylenMaxii{\the\wd\myboxii}%
\setlength\mylenaii{\the\wd\myboxii}%
\setlength\mylenbii{\the\wd\myboxvi}%
\ifdim\mylenbii>\mylenaii\relax
  \setlength\mylenMaxii{\mylenbii}
\fi
% Choose maximum width between the width of third box and the 
% width of seventh box; store the maximum in `\mylenMaxiii`
\setlength\mylenMaxiii{\the\wd\myboxiii}%
\setlength\mylenaiii{\the\wd\myboxiii}%
\setlength\mylenbiii{\the\wd\myboxvii}%
\ifdim\mylenbiii>\mylenaiii\relax
  \setlength\mylenMaxiii{\mylenbiii}
\fi
% Choose maximum width between the width of fourth box and the 
% width of eighth box; store the maximum in `\mylenMaxiv`
\setlength\mylenMaxiv{\the\wd\myboxiv}%
\setlength\mylenaiv{\the\wd\myboxiv}%
\setlength\mylenbiv{\the\wd\myboxviii}%
\ifdim\mylenbiv>\mylenaiv\relax
  \setlength\mylenMaxiv{\mylenbiv}
\fi
\noindent
\begin{tikzpicture}[every node/.append style={
draw,minimum height=1.3cm,align=center}
]
\node[text width=\mylenMaxi] (11) {#1};
\node[text width=\mylenMaxii,right= of 11] (12) {#2};
\node[text width=\mylenMaxiii,right= of 12] (13) {#3};
\node[text width=\mylenMaxiv,right= of 13] (14) {#4};
\node[text width=\mylenMaxi,below=of 11] (21) {#5};
\node[text width=\mylenMaxii,right= of 21] (22) {#6};
\node[text width=\mylenMaxiii,right= of 22] (23) {#7};
\node[text width=\mylenMaxiv,right= of 23] (24) {#8};
\end{tikzpicture}%
}

\begin{document}

\TikZEightTexts{Small}{Medium}{Large}{Larger}{AA}{Even larger}{B}{The 3 lines\\largest solution\\ever}

\vskip1cm

\TikZEightTexts{AAAA \\ AAAAAAAA \\ AAA}{B}{CCCCC}{DD}{EEEEEEE}{FFFFF}{GG \\ GGG }{HH \\ HH}

\end{document}

