For Programmers: Free Programming Magazines  


Home > Archive > Tcl > August 2004 > Keyboardinput and overrideredirect









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Keyboardinput and overrideredirect
Tillmann Basien

2004-08-29, 3:58 pm

Possibly one of the gurus can help me.

I want to open a dialog w/out WM decoration (kind of Welcome with input
fields ). So I use "wm overrideredirect .welcome 1"

If I do this I can not get any keyboard input into my entry widget:

wm withdraw .
toplevel .welcome
wm geometry .welcome 100x50
wm overrideredirect .welcome 1
entry .welcome.smb
button .welcome.exit -command exit -text exit
pack .welcome.smb .welcome.exit -expand 1 -fill both
focus .welcome.smb

What can I do?


Jeff Godfrey

2004-08-29, 3:58 pm

"Tillmann Basien" <tab@basien n0spam.de> wrote in message
news:2pejb6Fjuh0oU1@uni-berlin.de...
: Possibly one of the gurus can help me.
:
: I want to open a dialog w/out WM decoration (kind of Welcome with input
: fields ). So I use "wm overrideredirect .welcome 1"
:
: If I do this I can not get any keyboard input into my entry widget:
:
: wm withdraw .
: toplevel .welcome
: wm geometry .welcome 100x50
: wm overrideredirect .welcome 1
: entry .welcome.smb
: button .welcome.exit -command exit -text exit
: pack .welcome.smb .welcome.exit -expand 1 -fill both
: focus .welcome.smb


Does "focus -force .welcome.smb" instead of "focus .welcome.smb" do the
right thing?

Jeff


Tillmann Basien

2004-08-29, 3:58 pm

no it does not, Jeff.
But with -force I get the cursor inside of the entry widget. Keyboard inputs
are still outside.
TAB

"Jeff Godfrey" <jeff_godfrey@pobox.com> schrieb im Newsbeitrag
news:10j46q58kbenu7d@corp.supernews.com...
> "Tillmann Basien" <tab@basien n0spam.de> wrote in message
> news:2pejb6Fjuh0oU1@uni-berlin.de...
> : Possibly one of the gurus can help me.
> :
> : I want to open a dialog w/out WM decoration (kind of Welcome with input
> : fields ). So I use "wm overrideredirect .welcome 1"
> :
> : If I do this I can not get any keyboard input into my entry widget:
> :
> : wm withdraw .
> : toplevel .welcome
> : wm geometry .welcome 100x50
> : wm overrideredirect .welcome 1
> : entry .welcome.smb
> : button .welcome.exit -command exit -text exit
> : pack .welcome.smb .welcome.exit -expand 1 -fill both
> : focus .welcome.smb
>
>
> Does "focus -force .welcome.smb" instead of "focus .welcome.smb" do the
> right thing?
>
> Jeff
>
>



Jeff Godfrey

2004-08-29, 8:56 pm

"Tillmann Basien" <tab@basien n0spam.de> wrote in message
news:2pelebFk1v0tU1@uni-berlin.de...
: no it does not, Jeff.
: But with -force I get the cursor inside of the entry widget. Keyboard
inputs
: are still outside.
: TAB
:
: "Jeff Godfrey" <jeff_godfrey@pobox.com> schrieb im Newsbeitrag
: news:10j46q58kbenu7d@corp.supernews.com...
: > "Tillmann Basien" <tab@basien n0spam.de> wrote in message
: > news:2pejb6Fjuh0oU1@uni-berlin.de...
: > : Possibly one of the gurus can help me.
: > :
: > : I want to open a dialog w/out WM decoration (kind of Welcome with
input
: > : fields ). So I use "wm overrideredirect .welcome 1"
: > :
: > : If I do this I can not get any keyboard input into my entry widget:
: > :
: > : wm withdraw .
: > : toplevel .welcome
: > : wm geometry .welcome 100x50
: > : wm overrideredirect .welcome 1
: > : entry .welcome.smb
: > : button .welcome.exit -command exit -text exit
: > : pack .welcome.smb .welcome.exit -expand 1 -fill both
: > : focus .welcome.smb
: >
: >
: > Does "focus -force .welcome.smb" instead of "focus .welcome.smb" do the
: > right thing?
: >
: > Jeff


Hmmmm... I guess I don't know then. Under Windows, your original code
worked except that I had to "click" in the entry widget before I could type.
With the addition of the "-force" option, the code worked as (I assume was)
expected...

Sorry, but I guess you'll have to wait on some other input from the group.

Jeff


Donald Arseneau

2004-08-30, 8:58 pm

"Tillmann Basien" <tab@basien n0spam.de> writes:

> no it does not, Jeff.
> But with -force I get the cursor inside of the entry widget. Keyboard inputs
> are still outside.


I tried it on a couple of Linux computers with Kde and Icewm,
and [focus -force] does not work. However [grab -global] did.

I would not expect plain [focus] to work. Moreover, I think it
is incorrect behavior if clicking on an "overridedirect" window
gives it focus, because focus must be granted by the window
manager.

Donald Arseneau asnd@triumf.ca
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com