I've tried to apply the answer in Minimum height in split rectangle (with many thanks to Alain Matthes) using their defined mystrut.
I modified their code to have two lines in each nodepart
in the section of their code after % Split Rectangle, when I add \centerline{......} \centerline{........} after \nodepart{one} \mystrut, it will only modify the height of the box around the first line instead of the entire \nodepart{one}, how can I fix it?.
The modified code:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning}
\def\mystrut{\vrule height 1.5cm depth 1.5cm width 0pt}
\begin{document}
\begin{tikzpicture}[auto,
rect/.style={
rectangle split,
rectangle split parts=4,
draw=black,
rounded corners,
text width = 3cm
}]
% Split Rectangle
\node [rect] {
\mystrut \centerline{First} \\ \centerline{Item}
\nodepart{two}\mystrut \centerline{Second} \\ \centerline{Item}
\nodepart{three} \centerline{$\vdots$}
\nodepart{four} \mystrut \centerline{Last} \\ \centerline{Item}
};
\end{tikzpicture}
\end{document}
Result:



nodepart? – Faceb Faceb Aug 17 '17 at 11:33\mystrutin that case, but redefining it to give you the flexibility you need for multiline nodes of different heights. – cfr Aug 17 '17 at 12:57\mystrut, because for example in\nodepart{two}you put 10mm as first argument for the first line and 10mm as second argument for the second line. I cannot tag you btw (as in using @cfr) – Faceb Faceb Aug 17 '17 at 13:12\nodeparthas more than 2 lines? – Faceb Faceb Aug 17 '17 at 14:14\mystrutwith whatever arguments you need on however many lines you need. It is only affecting that particular line. – cfr Aug 17 '17 at 15:59\mystrut, because for example in\nodepart{two}you put 10mm as first argument for the first line and 10mm as second argument for the second line. I cannot tag you btw (as in using @cfr) (my comment from a few hours ago) – Faceb Faceb Aug 17 '17 at 16:32\mystrutfor a\nodepartthat has 4 lines? – Faceb Faceb Aug 18 '17 at 18:53\mystruton the second or third line and just add it on the first and fourth. That way, the text lines stay together. But it depends what you want. – cfr Aug 18 '17 at 22:45