scro
[iramuteq] / layout.py
index acf8b49..803b7ec 100644 (file)
--- a/layout.py
+++ b/layout.py
@@ -110,7 +110,7 @@ class GraphPanelAfc(wx.Panel):
         self.panel_1.EnableScrolling(True,True)
         #self.panel_1.SetSize((1000,1000))
         self.panel_1.SetScrollRate(20, 20)
-        self.paenl_1.SetFocus()
+        self.panel_1.SetFocus()
 
     def __do_layout(self):    
         self.sizer_1 = wx.BoxSizer(wx.VERTICAL)
@@ -269,12 +269,15 @@ class GraphPanel(wx.ScrolledWindow):
                 else :
                     self.listimg.append(wx.StaticBitmap(self, -1, wx.Bitmap(os.path.join(self.dirout,list_graph[i][0]), wx.BITMAP_TYPE_ANY)))
                 self.labels.append(wx.StaticText(self, -1, list_graph[i][1]))
-                
+        self.Bind(wx.EVT_MOTION, self.onMouseMove) 
         self.__set_properties()
         self.__do_layout()
 
     def __set_properties(self):
+        self.EnableScrolling(True,True)
         self.SetScrollRate(20, 20)   
+        self.SetFocus()
+
 
     def __do_layout(self):
         self.sizer_1 = wx.BoxSizer(wx.VERTICAL)
@@ -287,6 +290,9 @@ class GraphPanel(wx.ScrolledWindow):
         self.sizer_2.Add(self.sizer_1, 1, wx.EXPAND, 0)
         self.SetSizer(self.sizer_1)
         self.sizer_1.Fit(self)
+
+    def onMouseMove(self, event):
+        self.SetFocus()
        
 
 def open_antiprofil(panel, AntiProfile, encoding) :
@@ -660,6 +666,7 @@ class GraphPanelDendro(wx.Panel):
         self.panel_1.EnableScrolling(True,True)
         #self.panel_1.SetSize((1000,1000))
         self.panel_1.SetScrollRate(20, 20)
+        self.panel_1.SetFocus()
         self.Bind(wx.EVT_BUTTON, self.ondendro, self.butdendro)
         self.param = {'width' : 700,
                        'height': 500,
@@ -1165,7 +1172,7 @@ class GraphPanelSimi(wx.Panel):
                 else :
                     self.listimg.append(wx.StaticBitmap(self.panel_1, -1, wx.Bitmap(os.path.join(self.dirout,list_graph[i][0]), wx.BITMAP_TYPE_ANY)))
                 self.labels.append(wx.StaticText(self.panel_1, -1, list_graph[i][1]))
-                
+        self.panel_1.Bind(wx.EVT_MOTION, self.onMouseMove) 
         self.__set_properties()
         self.__do_layout()
 
@@ -1173,6 +1180,7 @@ class GraphPanelSimi(wx.Panel):
         self.panel_1.EnableScrolling(True,True)
         #self.panel_1.SetSize((1000,1000))
         self.panel_1.SetScrollRate(20, 20)
+        self.panel_1.SetFocus()
 
     def __do_layout(self):    
         self.sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
@@ -1187,3 +1195,6 @@ class GraphPanelSimi(wx.Panel):
         self.sizer_1.Add(self.sizer_2, 0, wx.EXPAND, 0)
         self.sizer_1.Add(self.panel_1, 1, wx.EXPAND, 0)
         self.SetSizer(self.sizer_1) 
+
+    def onMouseMove(self, event):
+        self.panel_1.SetFocus()