\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#161: Change Default for Menu's -tearoff Option to False}
\date{October 19, 2003}
\author{Mark Roseman}
\urlstyle{sf}
\setlength{\parskip}{1ex}
\setlength{\parindent}{0pt}
\def\tipversion$#1${\texttt{\$#1\$}}
\def\tiplangle#1{\ensuremath{<}}
\def\tiprangle#1{\ensuremath{>}}
\def\tipbar#1{\ensuremath{|}}
\def\tipmail#1#2{\(\langle\){\small\expandafter\url{#1@#2}}\(\rangle\)}
\ifx\pdfoutput\undefined
\newcommand{\tipimage}[2]{\typeout{Make sure you download #1.eps}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.eps}}{\includegraphics[width=0.8\textwidth]{#1.eps}}}
\newcommand{\tipxref}[1]{}
\newcommand{\tipxrefend}{}
\else
\newcommand{\tipimage}[2]{\typeout{Make sure you create #1.pdf}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.pdf}}{\includegraphics[width=0.8\textwidth]{#1.pdf}}}
\pdfcatalog{/PageMode /UseOutlines}
\newcommand{\tipxref}[1]{\pdfannotlink attr {/C [0.5 0.5 1.0] /Border [0 0 1]} goto name {#1}}
\newcommand{\tipxrefend}{\pdfendlink}
\fi
\newenvironment{tipabstract}{\begin{abstract}}{\end{abstract}}
\begin{document}\maketitle
\begin{center}\begin{tabularx}{\linewidth}{|r@{: }X|}\hline
\textbf{TIP \#161}&\textbf{Change Default for Menu's -tearoff Option to False}\\\hline
Author&

Mark Roseman \tipmail{mark}{markroseman.com}
\\
Created&Sunday, \(\text{19}^{\text{th}}\) October 2003\\
Type&Project\\
Tcl Version&\(9.0\)\\
State&Draft\\
Vote&Pending\\
Version&\tipversion$Revision: 1.2 $\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

This TIP proposes changing the default value of the \textit{-tearoff} option on menu widgets to false, from its current setting of true.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Rationale}

The default presence of tearoffs for Tk's menus originated with the Motif look \& feel, which was the platform standard used for earlier Unix-only versions of Tk. In more modern user interface toolkits on Unix, as well as Macintosh and Windows, menus do not normally have tearoffs associated with them. For applications today, menus without tearoffs are the standard, with tearoff menus being the exception.

While turning off the tearoff on menus can be accomplished either with a configuration option on the particular menu, or a global option setting, this can be a source of confusion for the new Tk developer, and too easily forgotten by other developers. Forcing developers to take extra action to achieve ``standard'' user interface behavior is contrary to Tk's philosophy.

\section{Proposed Change}

Implementation of this TIP requires only changing a single default in each of the platform specific \textit{tk*Default.h} files, and updating the documentation and test cases.

\section{Compatibility}

Unfortunately, entries in menus are often accessed by index within scripts, and the presence or absence of tearoff affects this index. Therefore, changing the default setting of this option will affect a large number of scripts. Though fixing these scripts will be straightforward (either through adjusting access to individual menus, or using the option database to turn the tearoff option back on), because of the incompatibility this TIP is proposed for 9.0 rather than 8.x.

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\end{document}
