[Tex/LaTex] Customizing beamer block height

beamerblock

I'm trying to specify a given height for a beamer block.
I tried to specify a new environment based on an example I found elsewhere on this forum (reproduced below), but failed miserably..
What I would like to do is to specify, each time, the height of the block (instead of its width).
Any suggestions?
Thanks in advance.

Andy

Example code:

\newenvironment<>{varblock}[2][.9\textwidth]{%
  \setlength{\textwidth}{#1}
  \begin{actionenv}#3%
  \def\insertblocktitle{#2}%
   \par%
   \usebeamertemplate{block begin}}
{\par%
\usebeamertemplate{block end}%
\end{actionenv}}

Best Answer

Probably not what you want, but in case you don't find a better solution, tcolorbox could help.

enter image description here

\documentclass{beamer}
\usetheme{warsaw}
\usepackage[most]{tcolorbox}

\begin{document}
\begin{frame}
\begin{tcolorbox}[beamer,title=tcolorbox,height=3cm]
Some text
\end{tcolorbox}

\begin{tcolorbox}[beamer,title=tcolorbox,height=4cm, width=5cm]
Some text
\end{tcolorbox}
\end{frame}
\end{document}