[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.1, Mon Jul 28 22:31:13 2003 UTC revision 1.2, Thu Jul 31 15:54:29 2003 UTC
# Line 7  Line 7 
7      def __init__(self, parent):      def __init__(self, parent):
8          self.parent = parent          self.parent = parent
9          self.to_re = parent.re          self.to_re = parent.re
10            self.selected = None       #remember last selected catalog entry
11                                       #..is used when LOAD button is hit.
12            button1= self.parent.OK_button
13            EVT_BUTTON(self.parent, self.parent.loadbtn.GetId(),
14                       self.onLoadBtnPress)
15    
16            return
17    
18      def InitLsCat(self):      def InitLsCat(self):
19          b=BssFactory()          b=BssFactory()
# Line 17  Line 23 
23              self.parent.catalog_listbox.Append(x[0], x[1])              self.parent.catalog_listbox.Append(x[0], x[1])
24    
25          EVT_LISTBOX(self.parent, self.parent.catalog_listbox.GetId(), self.onLeftClick)          EVT_LISTBOX(self.parent, self.parent.catalog_listbox.GetId(), self.onLeftClick)
26            return
27    
28      def onLeftClick(self,event):      def onLeftClick(self,event):
29          pt=self.parent.catalog_listbox.GetSelection()          pt=self.parent.catalog_listbox.GetSelection()
30          print "pt is ", pt          self.selected =int (self.parent.catalog_listbox.GetClientData(pt))
31          clickednum =int (self.parent.catalog_listbox.GetClientData(pt))          return
         print "clicknum is", clickednum  
32    
         b=BssFactory()  
         top= b.getRecoElemById(clickednum)  
33    
34        def onLoadBtnPress(self, event):
35            wxBeginBusyCursor()
36            b=BssFactory()
37            top= b.getRecoElemById( self.selected )
38          self.to_re.AddRecoElemTree(self.parent.rootId, top)          self.to_re.AddRecoElemTree(self.parent.rootId, top)
39          print "done adding to re"          wxEndBusyCursor()
40            return
   
   
41    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3