I have 3 parts in a tabular, I want onslide1- to be always displayed. After 1 clic, I want only2 to be shown; after another clic, at the position of only2, I want only3- to replace only2 forever; after another clic, onslide4- will appear. The code is as follows:
\documentclass{beamer}
\usetheme{Boadilla}
\usepackage[frenchb]{babel}
\begin{document}
\begin{frame}
\begin{tabular}{ll|ll}
\onslide<1->{
\\\hline onslide1- \\\hline
}
\onslide<2->{
\only<2>{
\\[-2.8ex]
only2\\\vspace{3cm}\\only2
\\\hline
}%
\only<3->{
\\[-2.8ex]
only3-\\\vspace{3cm}\\only3-
\\\hline
}}
\onslide<4->{
\\\hline onslide4- \\\hline
}
\end{tabular}
\end{frame}
The problem is when onslide1- is displayed in the very beginning, it doesn't leave the place for only2 or only3- which will appear later. I try to add a \onslide<2->, because normally \onslide reserve the place, but it doesn't work here... Does anyone know how to solve that?
PS: I realize that the following code, which is simpler than previous, has same problem:
\begin{frame}
\begin{tabular}{ll|ll}
\onslide<1->{onslide1\\}
\only<2>{only2\\}%
\only<3->{only3-\\}
\onslide<4->{onslide4-\\}
\end{tabular}
\end{frame}
However, the following code doesn't have this problem. So it seems that it is due to the position of \\, but I do need \\\hline in the initial code.
\begin{frame}
\begin{tabular}{ll|ll}
\onslide<1->{onslide1}\\
\only<2>{only2}%
\only<3->{only3-}\\
\onslide<4->{onslide4-}\\
\end{tabular}
\end{frame}

\phantom{}? – Sigur Aug 22 '12 at 0:15overlay... – SoftTimur Aug 22 '12 at 0:36