Tk Source Code

View Ticket
Login
Ticket UUID: 220851
Title: no focus on entry fields in container on NT
Type: Bug Version: obsolete: 8.1
Submitter: welch Created on: 2000-11-01 01:29:59
Subsystem: 68. Win Window Operations Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2008-11-05 07:21:53
Resolution: Out of Date Closed By: hobbs
    Closed on: 2008-11-05 00:21:53
Description:
OriginalBugID: 2262 Bug
Version: 8.1
SubmitDate: '1999-06-21'
LastModified: '2000-01-27'
Severity: SER
Status: UnAssn
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 3798
OS: Windows NT
Machine: X86


Name:
Christian Eva

ReproducibleScript:
On Linux it is no problem to have an separate tk application running in a
container frame. On windows we can run the application, button events work
but we can not get the focus on entry fields - i.e. no possibility to enter
caracters.

script-1 (start wish81 and source the script, it will display the window-id):
# container test, container frame

set wcon [frame .con -container 1]
pack $wcon  -anchor nw -expand yes -fill both
set wid [winfo id $wcon]

puts "container $wcon established, wid=$wid"

Script-2 (start wish81 -use window-id) and source script:
# container test, entry field

catch {destroy .f}
frame .f
pack .f  -anchor nw -expand yes -fill both

set vtext initial
set went [entry .f.ent -bg pink -width 20 -textvariable vtext]
pack $went

puts "Entry $went established"

set wfocus [focus]
set wgrab [grab current .]

puts "Focus=$wfocus, Grab=$wgrab"

tkwait visibility $went
focus $went
set wfocus [focus]
grab $went
set wgrab [grab current .]
puts "focus=$wfocus, grab=$wgrab, waiting ..."
tkwait var vtext
puts "vtext=$vtext"
 
focus -force $went
set wfocus [focus]
set wgrab [grab current .]
puts "focus -force=$wfocus, grab=$wgrab, waiting ..."
tkwait var vtext
puts "vtext=$vtext"

focus -force $went
grab -global $went
set wfocus [focus]
set wgrab [grab current .]

puts "focus=$wfocus, global grab=$wgrab, waiting ..."
tkwait var vtext
puts "vtext=$vtext"
grab release $went
User Comments: kennykb added on 2004-03-05 23:10:31:
Logged In: YES 
user_id=99768

Uhm, I have even less of an idea why this was assigned to
me, since I don't usually maintain Tk.

vincentdarley added on 2003-11-13 15:48:06:
Logged In: YES 
user_id=32170

No idea why this was assigned to me. I know nothing about
Windows-window operations/focus/grabs etc ;-)