Tabbing: Colored background

\documentclass{article}

\newenvironment{mytabbing}{%
\begin{minipage}[t]{3in}
\begin{tabbing}
\hspace*{2cm}\= \hspace*{2cm}\= \hspace*{2cm}\= \hspace*{2cm} \kill
TAB-1 \> TAB-2 \> TAB-3 \> TAB-4\\
}%
{\end{tabbing}\end{minipage}}%

\begin{document}
\begin{mytabbing}
Test1 \> Test2 \> Test3 \>Test4
\end{mytabbing}

\end{document}


If I want colored background for the column names (TAB-1 ...), do I have to work in some tabular (tabularx, etc.) environment, and I have no other option? Something like:

• Please try with better option with the combination of tabularx and colortbl packages, instead of tabbing – MadyYuvi Sep 16 at 8:21
• if you could upload a sketch of the desired output it would be helpful – js bibra Sep 17 at 0:43
• @jsbibra Added. – blackened Sep 17 at 7:40

Here is the solution with the tabular environment.

\documentclass{article}

\usepackage[margin=1in]{geometry}
\usepackage{colortbl}
\usepackage{xcolor}
\usepackage{amssymb}
\usepackage{tikz}

\renewcommand{\arraystretch}{2}
\newcommand{\cred}[1]{\color{red}#1}
\newcommand{\wt}[1]{\color{white}\textbf{#1}}

\begin{document}

\begin{center}
\begin{tabular}{llll}
\rowcolor{gray!60} \wt{SOUTH} & \wt{WEST} & \wt{NORTH} & \wt{EAST} \\
\tikz \draw (0,0) -- (1,0); & 1 $\clubsuit$   & Double & Pass\\
1 $\cred{\blacklozenge}$ & Pass & 2 $\clubsuit$ & Pass \\
2 $\cred{\blacklozenge}$ & Pass & 2 $\cred{\spadesuit}$& Pass \\
\hspace{0.15cm}\textbf{?}  & & & \\
\end{tabular}
\end{center}

\end{document}


The ? is now centered.

• the ? needs to be centered – js bibra Sep 17 at 8:30