dialogs/FindInPouDialog.py
branch1.1 Korean release
changeset 1280 72a826dfcfbb
parent 1098 0ead830daf26
child 1490 f03bc6c9c146
equal deleted inserted replaced
977:c8e008b8cefe 1280:72a826dfcfbb
    95         buttons_sizer = wx.BoxSizer(wx.HORIZONTAL)
    95         buttons_sizer = wx.BoxSizer(wx.HORIZONTAL)
    96         main_sizer.AddSizer(buttons_sizer, border=20, 
    96         main_sizer.AddSizer(buttons_sizer, border=20, 
    97               flag=wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.ALIGN_RIGHT)
    97               flag=wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.ALIGN_RIGHT)
    98         
    98         
    99         self.FindButton = wx.Button(panel, label=_("Find"))
    99         self.FindButton = wx.Button(panel, label=_("Find"))
       
   100         self.FindButton.SetDefault()
   100         self.Bind(wx.EVT_BUTTON, self.OnFindButton, self.FindButton)
   101         self.Bind(wx.EVT_BUTTON, self.OnFindButton, self.FindButton)
   101         buttons_sizer.AddWindow(self.FindButton, border=5, flag=wx.RIGHT)
   102         buttons_sizer.AddWindow(self.FindButton, border=5, flag=wx.RIGHT)
   102         
   103         
   103         self.CloseButton = wx.Button(panel, label=("Close"))
   104         self.CloseButton = wx.Button(panel, label=("Close"))
   104         self.Bind(wx.EVT_BUTTON, self.OnCloseButton, self.CloseButton)
   105         self.Bind(wx.EVT_BUTTON, self.OnCloseButton, self.CloseButton)
   107         panel.SetSizer(main_sizer)
   108         panel.SetSizer(main_sizer)
   108         
   109         
   109         self.ParentWindow = parent
   110         self.ParentWindow = parent
   110         
   111         
   111         self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)
   112         self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)
   112     
   113         
       
   114         self.FindPattern.SetFocus()
   113         self.RefreshButtonsState()
   115         self.RefreshButtonsState()
   114     
   116     
   115     def RefreshButtonsState(self):
   117     def RefreshButtonsState(self):
   116         find_pattern = self.FindPattern.GetValue()
   118         find_pattern = self.FindPattern.GetValue()
   117         self.FindButton.Enable(find_pattern != "")
   119         self.FindButton.Enable(find_pattern != "")