Changeset 1768
- Timestamp:
- 07/14/10 14:53:59 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/python/casatoolbar.py
r1765 r1768 141 141 ### TkAgg 142 142 if matplotlib.get_backend() == 'TkAgg': import Tkinter as Tk 143 class CustomToolbarTkAgg(CustomToolbarCommon ):143 class CustomToolbarTkAgg(CustomToolbarCommon, Tk.Frame): 144 144 def __init__(self,parent): 145 145 from asap.asapplotter import asapplotter … … 149 149 self.figmgr=self._p.figmgr 150 150 self.canvas=self.figmgr.canvas 151 self.custombar=None152 151 self.mode='' 153 152 self.button=True … … 156 155 157 156 def _add_custom_toolbar(self): 158 self.custombar=Tk.Frame(master=self.figmgr.window)159 self.bSpec=self._NewButton(master=self .custombar,157 Tk.Frame.__init__(self,master=self.figmgr.window) 158 self.bSpec=self._NewButton(master=self, 160 159 text='spec value', 161 160 command=self.spec_show) 162 self.bStat=self._NewButton(master=self .custombar,161 self.bStat=self._NewButton(master=self, 163 162 text='statistics', 164 163 command=self.stat_cal) 165 self.bQuit=self._NewButton(master=self .custombar,164 self.bQuit=self._NewButton(master=self, 166 165 text='Quit', 167 166 command=self.quit, 168 167 side=Tk.RIGHT) 169 self.custombar.pack(side=Tk.BOTTOM,fill=Tk.BOTH) 170 171 ### temporary added 172 #self.bStat.config(state=Tk.DISABLED) 173 ### 174 #self.bSpec.config(relief='sunken') 175 #self.bStat.config(relief='raised') 176 #self.button=True 177 #self.spec_show() 168 self.pack(side=Tk.BOTTOM,fill=Tk.BOTH) 169 178 170 self.disable_button() 179 return self171 return #self 180 172 181 173 def _NewButton(self, master, text, command, side=Tk.LEFT): … … 231 223 def delete_bar(self): 232 224 self.__disconnect_event() 233 self.custombar.destroy() 234 self.custombar=None 225 self.destroy() 235 226 236 227 def __disconnect_event(self):
Note:
See TracChangeset
for help on using the changeset viewer.