Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Keyboardinput and overrideredirect
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?



Report this thread to moderator Post Follow-up to this message
Old Post
Tillmann Basien
08-29-04 08:58 PM


Re: Keyboardinput and overrideredirect
"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



Report this thread to moderator Post Follow-up to this message
Old Post
Jeff Godfrey
08-29-04 08:58 PM


Re: Keyboardinput and overrideredirect
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
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Tillmann Basien
08-29-04 08:58 PM


Re: Keyboardinput and overrideredirect
"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



Report this thread to moderator Post Follow-up to this message
Old Post
Jeff Godfrey
08-30-04 01:56 AM


Re: Keyboardinput and overrideredirect
"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 inpu
ts
> 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

Report this thread to moderator Post Follow-up to this message
Old Post
Donald Arseneau
08-31-04 01:58 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Tcl archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:55 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.