TIP #441: Add -justify Configuration Option to the listbox Widget
_____________________________________________________________________________
TIP:	441
Title:	Add -justify Configuration Option to the listbox Widget
Version:	$Revision: 1.3 $
Authors:	François Vogel <fvogelnew1@users.sf.net>
	François Vogel <fvogelnew1@free.fr>
State:	Final
Type:	Project
Tcl-Version:	8.6.5
Vote:	Done
Created:	Mon Jan 18 00:00:00 UTC 2016
Keywords:	Tk, listbox
Abstract
Despite the 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.
Rationale
Currently the listbox widget always aligns its items leftwards. Some users miss a configuration options allowing to justify items in the listbox widget. These RFE include:
RFE 454303, [https://core.tcl.tk/tk/tktview/454303]
RFE 3f456a5bb9, [https://core.tcl.tk/tk/tktview/3f456a5bb9]
Proposed Change
It is proposed to add the -justify configuration option to the Tk listbox widget.
Possible values are as already documented in the options manual page (i.e., left, center, or right), and translate internally into standard Tk_Justify values, i.e., TK_JUSTIFY_LEFT, TK_JUSTIFY_CENTER, and TK_JUSTIFY_RIGHT, respectively.
Default value is left on all platforms, for backwards compatibility reasons.
Reference Implementation
A reference implementation is available in branch tip-441 of the fossil repository.
Copyright
This document has been placed in the public domain.
_____________________________________________________________________________
Colophon
TIP AutoGenerator - written by Donal K. Fellows