<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE TIP SYSTEM "http://www.tcl.tk/cgi-bin/tct/tip/tipxml.dtd">
<!-- Converted at Thu May 17 03:23:07 GMT 2012 -->
<!-- TIP AutoGenerator - written by Donal K. Fellows -->

<TIP number='197'>
<header><title>Unfocussed Text Widget Cursor Control</title><author address="mailto:tim@stravinsky.jhuapl.edu">R. Timothy Edwards</author><author address="mailto:donal.k.fellows@manchester.ac.uk">Donal K. Fellows</author><status type='project' state='final' tclversion="8.6" vote='after'>$Revision: 1.10 $</status><history></history><created day='12' month='may' year='2004' /><keyword>Tk</keyword></header>
<abstract>This TIP proposes a simple extension to the Tk text widget to allow the insertion cursor to persist when the window containing the text widget does not have focus.</abstract>
<body><section title="Rationale">
<para>In some cases it is useful to redirect text from one top-level window into a separate top-level window containing a text widget. In such a case, it is helpful to be able to see the cursor in the text widget. However, as implemented, the Tk text widget always erases the insert cursor when the window loses focus. It is a trivial fix to add an option <emph style="bold">-insertunfocussed</emph> to the text widget that keeps the text cursor in the window.</para>
</section>
<section title="Specification">
<para>The extension would provide a global <emph style="bold">text</emph> widget option <emph style="bold">-insertunfocussed</emph> with a ternary value. The current behaviour would be the default.</para>
<quote><emph style="italic">pathName</emph> <emph style="bold">configure -insertunfocussed</emph> <emph style="italic">value</emph></quote>
<para>Supported values will be:</para>
<describe><item.d name='none'><para>Do not display the insertion cursor when the text widget doesn&apos;t have the focus.</para></item.d><item.d name='hollow'><para>Display the border of the insertion cursor when the text widget doesn&apos;t have the focus, but do not fill the cursor or make it flash. If the <emph style="bold">-insertborderwidth</emph> option is zero, draw (but do not fill) a rectangle in the <emph style="bold">-insertbackground</emph> color.</para></item.d><item.d name='solid'><para>Display the insertion cursor unchanged whether or not the text widget has the focus. The insertion cursor will not flash when the widget does not have the focus.</para></item.d></describe>
<para>In all cases, the insertion cursor will be displayed as at present when the text widget does have the focus.</para>
</section>
<section title="Copyright">
<para>This document has been placed in the public domain.</para>
</section>
</body></TIP>

