Changeset 1768 for branches/alma


Ignore:
Timestamp:
07/14/10 14:53:59 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: none

Put in Release Notes: No

Module(s): ASAP plotter and sdplot

Description: removed an attribute, custombar, from the class

CustomToolbarTkAgg and inherit Tkinter.Frame class instead.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/alma/python/casatoolbar.py

    r1765 r1768  
    141141### TkAgg
    142142if matplotlib.get_backend() == 'TkAgg': import Tkinter as Tk
    143 class CustomToolbarTkAgg(CustomToolbarCommon):
     143class CustomToolbarTkAgg(CustomToolbarCommon, Tk.Frame):
    144144    def __init__(self,parent):
    145145        from asap.asapplotter import asapplotter
     
    149149        self.figmgr=self._p.figmgr
    150150        self.canvas=self.figmgr.canvas
    151         self.custombar=None
    152151        self.mode=''
    153152        self.button=True
     
    156155
    157156    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,
    160159                                   text='spec value',
    161160                                   command=self.spec_show)
    162         self.bStat=self._NewButton(master=self.custombar,
     161        self.bStat=self._NewButton(master=self,
    163162                                   text='statistics',
    164163                                   command=self.stat_cal)
    165         self.bQuit=self._NewButton(master=self.custombar,
     164        self.bQuit=self._NewButton(master=self,
    166165                                   text='Quit',
    167166                                   command=self.quit,
    168167                                   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
    178170        self.disable_button()
    179         return self
     171        return #self
    180172
    181173    def _NewButton(self, master, text, command, side=Tk.LEFT):
     
    231223    def delete_bar(self):
    232224        self.__disconnect_event()
    233         self.custombar.destroy()
    234         self.custombar=None
     225        self.destroy()
    235226
    236227    def __disconnect_event(self):
Note: See TracChangeset for help on using the changeset viewer.