From e2e8b84e6a46f01807ae34191bb42e08e0d7637f Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Wed, 27 Jan 2021 17:32:12 -0600 Subject: [PATCH] Fixed focus when search dialog opens. Fixes #364 --- src/wxUI/dialogs/search.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wxUI/dialogs/search.py b/src/wxUI/dialogs/search.py index 13cc45ce..b8b6da56 100644 --- a/src/wxUI/dialogs/search.py +++ b/src/wxUI/dialogs/search.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import -from __future__ import unicode_literals import widgetUtils from . import baseDialog import wx @@ -14,6 +12,7 @@ class searchDialog(baseDialog.BaseWXDialog): self.SetTitle(_(u"Search on Twitter")) label = wx.StaticText(panel, -1, _(u"&Search")) self.term = wx.TextCtrl(panel, -1, value) + self.term.SetFocus() dc = wx.WindowDC(self.term) dc.SetFont(self.term.GetFont()) self.term.SetSize(dc.GetTextExtent("0"*40))