\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#441: Add -justify Configuration Option to the listbox Widget}
\date{January 18, 2016}
\author{François Vogel, François Vogel}
\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 \#441}&\textbf{Add -justify Configuration Option to the listbox Widget}\\\hline
Author&

François Vogel \tipmail{fvogelnew1}{users.sf.net}
\par
François Vogel \tipmail{fvogelnew1}{free.fr}
\\
Created&Monday, \(\text{18}^{\text{th}}\) January 2016\\
Type&Project\\
Tcl Version&\(8.6.5\)\\
State&Final\\
Vote&Done\\
Version&\tipversion$Revision: 1.3 $\\
Keywords&Tk, listbox\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

Despite the \textbf{listbox} widget already having numerous configuration options, some users need more refinements and have requested the possibility to control the justification of the text displayed in the items of the listbox. This TIP proposes to add this option.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Rationale}

Currently the \textbf{listbox} widget always aligns its items leftwards. Some users miss a configuration options allowing to justify items in the \textbf{listbox} widget. These RFE include:
\begin{itemize}
\item{}
RFE 454303, [\url{https://core.tcl.tk/tk/tktview/454303}]
\item{}
RFE 3f456a5bb9, [\url{https://core.tcl.tk/tk/tktview/3f456a5bb9}]
\end{itemize}

\section{Proposed Change}

It is proposed to add the \textbf{-justify} configuration option to the Tk \textbf{listbox} widget.

Possible values are as already documented in the \textbf{options} manual page (i.e., \textbf{left}, \textbf{center}, or \textbf{right}), and translate internally into standard \textit{Tk\_Justify} values, i.e., TK\_JUSTIFY\_LEFT, TK\_JUSTIFY\_CENTER, and TK\_JUSTIFY\_RIGHT, respectively.

Default value is \textbf{left} on all platforms, for backwards compatibility reasons.

\section{Reference Implementation}

A reference implementation is available in branch tip-441 of the fossil repository.

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

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