I just saw in the code:
if event.key is None: # simulate backspace
So it works properly,
Mark

On 6/5/07, Mark Bakker < markbak@gmail.com> wrote:
I notice the alignment problem.
But it looks like you are close.
On my machine (win32), the 'enter' key didn't work either. It works like a backspace. That sounds like what Matthias reported.
Mark


On 6/5/07, John Hunter <jdh2358@gmail.com> wrote:
On 6/5/07, John Hunter <jdh2358@gmail.com> wrote:

> I worked on this some time ago, I never got to the point where I
> thought it was ready for production but it is  close.  There is a
> problem if usetex is enabled, because partial tex strings will cause
> errors.  But you can use it with regular text or plain text.

Typo: "plain text" was meant to be "math text"

Now I remember what really bothered me about this widget, and it
wasn't just the usetex problem.  The problem is that mpl has three
different vertical alignment methods for text: top, bottom and center.
None of them are right for a text box: you want baseline.  Try typing
"thinking" into the text box and watch what happens when you add and
remove the "g".  We do need to support baseline alignment for text, so
if someone has an interest in adding this it would be a very useful
feature, not just for a text box for for text alignment (eg tick
labels) in general.

See the image of the "g" at
http://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-3.html
for a visual representation -- hwat I am calling the "baseline" they
refer to as the "origin" in that graph.  Our default alignment should
be "origin" or "baseline" but we don't have support for that.

JDH