Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#252 closed Bug (Fixed)

Control focus changing when window loses/regains focus

Reported by: Saunders <admin@…> Owned by: Jon
Milestone: Component: AutoIt
Version: Severity: None
Keywords: focus change Cc:


This bug appears to have been introduced in
Steps to reproduce:

  1. Run script, notice the ToolTip which constantly displays the focused window control.
  2. Manually place focus in the edit control (click the mouse in the field).
  3. Alt+Tab, or otherwise change the system focus to another window.
  4. Return to the script's window.
  5. The window's focus has changed to the label (Static1). With AutoIt, the focus correctly stays on the Edit control (Edit1).
Global Const $WS_CHILD = 0x40000000
Global Const $GUI_EVENT_CLOSE = -3

$guiP = GUICreate(@AutoItVersion, 200, 200)
GUICtrlCreateLabel('Label (Static1)', 0, 0, 200, 20)

$guiC = GUICreate('', 200, 180, 0, 20, $WS_CHILD, Default, $guiP)
GUICtrlCreateEdit('Edit (Edit1)', 0, 0, 200, 180)

While 1
	$gm = GUIGetMsg()
	If $gm = $GUI_EVENT_CLOSE Then ExitLoop

Attachments (0)

Change History (3)

comment:1 Changed 16 years ago by Jon

I found the revision it happened in (3297) which was when I fixed the new accelerator code. Not sure what is causing it though yet...

comment:2 Changed 16 years ago by Jon

  • Milestone set to
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in version:

comment:3 Changed 15 years ago by Valik

  • Milestone changed from to

Fixing wrong milestone.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jon.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.