[Bio] / PyGUI / Catalogpanel.py Repository:
ViewVC logotype

Diff of /PyGUI/Catalogpanel.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19, Thu Nov 13 21:41:08 2003 UTC revision 1.22, Fri Mar 5 19:30:38 2004 UTC
# Line 4  Line 4 
4  from FaST.SeedDataFactory import SeedDataFactory  from FaST.SeedDataFactory import SeedDataFactory
5  from FaST.SeedDataFactory import SeedOrganism  from FaST.SeedDataFactory import SeedOrganism
6  from FaST.RecoElem import RecoElem  from FaST.RecoElem import RecoElem
7  from RecoElempanel import RecoElemWindow  from RecoElempanel import RecoElempanel
8    
9    
10    
11  class CatalogWindow:  class Catalogpanel:
12  #    def __init__(self, parent):  #    def __init__(self, parent):
13  #    def initCatEvents(self ):  #    def initCatEvents(self ):
14  #    def initCatData( self ):  #    def initCatData( self ):
# Line 50  Line 50 
50      #------------------------------------------------------------------------      #------------------------------------------------------------------------
51      def initCatEvents(self ):      def initCatEvents(self ):
52      #------------------------------------------------------------------------      #------------------------------------------------------------------------
53          button1= self.parent.OK_button  
         EVT_BUTTON(self.parent, self.parent.loadbtn.GetId(),  
                    self.onLoadBtnPress)  
54          EVT_TREE_SEL_CHANGED(self.parent.catalog_tree,          EVT_TREE_SEL_CHANGED(self.parent.catalog_tree,
55                               self.parent.catalog_treeId,                               self.parent.catalog_treeId,
56                               self.onLeftClick)                               self.onLeftClick)
# Line 63  Line 61 
61          EVT_RIGHT_DOWN(self.parent.catalog_tree, self.onRightClickCatalogTree)          EVT_RIGHT_DOWN(self.parent.catalog_tree, self.onRightClickCatalogTree)
62    
63    
64          # doesn't work...          EVT_LEFT_DCLICK (self.parent.catalog_tree, self.onLeftDClick)
         # EVT_LEFT_DCLICK (self.parent.catalog_tree, self.onLeftDClick)  
65    
66          return          return
67    
# Line 218  Line 215 
215    
216          return          return
217    
     #------------------------------------------------------------------------  
     def onLeftDClick(self,treeEvent):  
     #------------------------------------------------------------------------  
         self.onLoadBtnPress(treeEvent)  
   
         pt = treeEvent.GetPosition()  
         item = self.parent.tree_ctr.HitTest(pt)  
         print item  
         catEntryTuple = self.parent.tree_ctr.GetPyData(item)  
         apply(catEntryTuple[0], catEntryTuple[1])  
         return  
   
         pt = treeEvent.GetPosition()  
   
         item = self.parent.tree_ctr.HitTest(pt)  
   
         print item  
         catEntryTuple = self.parent.tree_ctr.GetPyData(item)  
         #print catEntryTuple, "catEntryTuple"  
         #self.selected = catEntryTuple  
   
         #catEntryTuple = self.selected  
         #apply(catEntryTuple[0], [catEntryTuple[1]])  
   
         return  
   
218    
219      #------------------------------------------------------------------------      #------------------------------------------------------------------------
220      def onLoadBtnPress(self, event):      def onLeftDClick(self, event):
221      #------------------------------------------------------------------------      #------------------------------------------------------------------------
222          if ( self.selected == None ):          if ( self.selected == None ):
223              print "No selection in onLoadBtnPress"              print "No selection in onLoadBtnPress"

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.22

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3