# HG changeset patch # User Andrey Skvortsov # Date 1482941128 -10800 # Node ID 474de7fdcfd9e32317800ea419bef29a29b4aded # Parent 3f3d97be9a9f8fe6e7c7f963567a6a0e1e03d82a convert FindInPouDialog from wx.Frame to wx.Dialog In this case FindInPouDialog Windows isn't listed in windows manager on Alt-Tab. And it's not shown on top of other applications. For example, previously the dialog was shown even on top of web browser or word processor. diff -r 3f3d97be9a9f -r 474de7fdcfd9 dialogs/FindInPouDialog.py --- a/dialogs/FindInPouDialog.py Wed Dec 28 17:10:04 2016 +0300 +++ b/dialogs/FindInPouDialog.py Wed Dec 28 19:05:28 2016 +0300 @@ -25,7 +25,7 @@ import wx from plcopen.plcopen import * -class FindInPouDialog(wx.Frame): +class FindInPouDialog(wx.Dialog): def _init_icon(self, parent): if parent and parent.icon: @@ -33,15 +33,13 @@ def __init__(self, parent): - wx.Frame.__init__(self, parent, title=_("Find"), - size=wx.Size(410, 250), style=wx.CAPTION| + wx.Dialog.__init__(self, parent, title=_("Find"), + size=wx.Size(500, 280), style=wx.CAPTION| wx.CLOSE_BOX| wx.CLIP_CHILDREN| - wx.RESIZE_BORDER| - wx.STAY_ON_TOP) + wx.RESIZE_BORDER) self._init_icon(parent) - self.CreateStatusBar(style=wx.SB_FLAT) panel = wx.Panel(self, style=wx.TAB_TRAVERSAL) main_sizer = wx.FlexGridSizer(cols=1, hgap=5, rows=2, vgap=5) @@ -113,6 +111,9 @@ self.CloseButton = wx.Button(panel, label=_("Close")) self.Bind(wx.EVT_BUTTON, self.OnCloseButton, self.CloseButton) buttons_sizer.AddWindow(self.CloseButton) + + self.StatusLabel = wx.StaticText(panel, label= "") + controls_sizer.AddWindow(self.StatusLabel, flag=wx.ALIGN_CENTER_VERTICAL) panel.SetSizer(main_sizer) @@ -147,6 +148,10 @@ self.RefreshButtonsState() event.Skip() + def SetStatusText(self, msg): + self.StatusLabel.SetLabel(msg) + self.Layout() + def OnFindButton(self, event): infos = { "find_pattern": self.FindPattern.GetValue(),