<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE TIP SYSTEM "http://tcl.activestate.com/cgi-bin/tct/tip/tipxml.dtd">
<!-- Converted at Thu Feb 09 07:42:24 GMT 2012 -->
<!-- TIP AutoGenerator - written by Donal K. Fellows -->

<TIP number='63'>
<header><title>Add -compound Option to Menu Entries</title><author address="mailto:vincentdarley@users.sourceforge.net">Vince Darley</author><status type='project' state='final' tclversion="8.4" vote='after'>$Revision: 1.5 $</status><history></history><created day='27' month='sep' year='2001' /></header>
<abstract>This TIP adds to menu entries the ability to display both textual labels and images (or bitmaps) in exactly the same way as buttons and menubuttons currently can, by adding a <emph style="italic">-compound</emph> option.</abstract>
<body><section title="Rationale">
<para>Menu entries are very similar to labels in most respects, but they currently lack the ability to show an image and a piece of text at the same time. It is a useful piece of functionality currently missing from Tk (certainly many standard applications make use of such menu entries, e.g. Internet Explorer). The changes involved are relatively small.</para>
<para>A very similar TIP <tipref type="text" tip="11"/> was accepted without much argument.</para>
</section>
<section title="Proposal">
<para>This TIP implements the change by adding an additional option <emph style="italic">-compound</emph> to menu entries which behaves identically to Tk&apos;s existing <emph style="italic">-compound</emph> option: it accepts the values <emph style="italic">none</emph>, <emph style="italic">center</emph>, <emph style="italic">left</emph>, <emph style="italic">right</emph>, <emph style="italic">top</emph>, and <emph style="italic">bottom</emph>, and controls the relative placement of an image to the text label in the entry.</para>
<para>A reference implementation exists, and is available from: <url ref="ftp://ftp.ucsd.edu/pub/alpha/tcl/compoundmenu.diff"/> (note this diff has Windows-style line endings). This implementation is known to work on Windows and Unix, and since the changes are very, very similar on MacOS I expect it to work there (except perhaps for simple editing mistakes).</para>
</section>
<section title="Copyright">
<para>This document has been placed in the public domain.</para>
</section>
</body></TIP>

