Tk Source Code

View Ticket
Login
Ticket UUID: 220278
Title: Does not default to Top Level window focus
Type: Bug Version: obsolete: 8.2.1
Submitter: welch Created on: 2000-10-31 23:03:19
Subsystem: 65. Generic Window Operations Assigned To: nobody
Priority: 1 Zero Severity:
Status: Closed Last Modified: 2000-11-01 06:03:19
Resolution: Invalid Closed By: welch
    Closed on: 2000-10-31 23:03:19
Description:
OriginalBugID: 4151 RFE
Version: 8.2.1
SubmitDate: '2000-02-10'
LastModified: '2000-03-27'
Severity: MED
Status: Closed
Submitter: techsupp
ChangedBy: ericm
OS: Windows 98
Machine: Pentium II 266 / Enterprise 250 Ultrasparc Solaris 7
ClosedDate: '2000-03-27'


Name:
Matthew Yacobucci

DesiredBehavior:
I'm just getting started with tcl/tk and some users are reporting that upon instantiation of a window it does not have a default focus.  For example if I open Notepad in Windows that window will be in focus and I can immediately start typing.  With tcl/tk though if I instantiate a window there needs to be another mouse click to establish focus to that new window.  I want the top-level window to have focus immediately - how do I do this, or can this behavior be added to upcoming releases?



You can get the behavior you want by explicitly setting the focus to the toplevel you have created:

toplevel .t
focus -force .t

Hope this helps,

- eric

-- 03/27/2000 ericm