two questions on tkinter
Martin Franklin
mfranklin1 at gatwick.westerngeco.slb.com
Thu Aug 22 18:37:17 EDT 2002
On Wednesday 21 Aug 2002 10:03 pm, Michele Simionato wrote:
> I have a couple of questions on Tkinter.
>
> 1. First, how do I bind special keys like #,$,>,<,;0123456789 etc ? How
> do I bind Space key ? Are the Windows keys recognized ?
>
> 2. How do I use colors in the Text widget ? For instance I would like to
> write RED GREEN BLUE with RED in red, GREEN in green and BLUE in blue.
>
> TIA,
>
> Michele
For answers to 1 take a look at this (PDF) document. Section 22.2 (Page
~75):- http://www.nmt.edu/tcc/help/lang/python/tkinter.pdf
And I quote:-
The general form of an event pattern is: < [modifier -] type [- detail]>
The entire pattern is enclosed inside <>
..... <snip> ....
For example:
<Control-Shift-KeyPress-H> : The user pressed CONTROL - SHIFT -H.
HTH
Martin
More information about the Python-list
mailing list