PATH:
opt
/
alt
/
python33
/
lib64
/
python3.3
/
idlelib
""" OptionMenu widget modified to allow dynamic menu reconfiguration and setting of highlightthickness """ from tkinter import OptionMenu from tkinter import _setit import copy class DynOptionMenu(OptionMenu): """ unlike OptionMenu, our kwargs can include highlightthickness """ def __init__(self, master, variable, value, *values, **kwargs): #get a copy of kwargs before OptionMenu.__init__ munges them kwargsCopy=copy.copy(kwargs) if 'highlightthickness' in list(kwargs.keys()): del(kwargs['highlightthickness']) OptionMenu.__init__(self, master, variable, value, *values, **kwargs) self.config(highlightthickness=kwargsCopy.get('highlightthickness')) #self.menu=self['menu'] self.variable=variable self.command=kwargs.get('command') def SetMenu(self,valueList,value=None): """ clear and reload the menu with a new set of options. valueList - list of new options value - initial value to set the optionmenu's menubutton to """ self['menu'].delete(0,'end') for item in valueList: self['menu'].add_command(label=item, command=_setit(self.variable,item,self.command)) if value: self.variable.set(value)
[-] PathBrowser.py
[edit]
[-] MultiStatusBar.py
[edit]
[-] AutoExpand.py
[edit]
[-] CodeContext.py
[edit]
[-] GrepDialog.py
[edit]
[-] configSectionNameDialog.py
[edit]
[-] RemoteObjectBrowser.py
[edit]
[-] CREDITS.txt
[edit]
[-] FileList.py
[edit]
[-] AutoComplete.py
[edit]
[-] EditorWindow.py
[edit]
[+]
idle_test
[-] IdleHistory.py
[edit]
[+]
..
[-] Bindings.py
[edit]
[+]
Icons
[+]
__pycache__
[-] NEWS.txt
[edit]
[-] idle.py
[edit]
[-] tabbedpages.py
[edit]
[-] IOBinding.py
[edit]
[-] ParenMatch.py
[edit]
[-] config-main.def
[edit]
[-] Percolator.py
[edit]
[-] textView.py
[edit]
[-] UndoDelegator.py
[edit]
[-] CallTipWindow.py
[edit]
[-] CallTips.py
[edit]
[-] extend.txt
[edit]
[-] WindowList.py
[edit]
[-] __main__.py
[edit]
[-] config-extensions.def
[edit]
[-] PyShell.py
[edit]
[-] ToolTip.py
[edit]
[-] Debugger.py
[edit]
[-] idlever.py
[edit]
[-] MultiCall.py
[edit]
[-] StackViewer.py
[edit]
[-] ObjectBrowser.py
[edit]
[-] TreeWidget.py
[edit]
[-] idle.pyw
[edit]
[-] run.py
[edit]
[-] dynOptionMenuWidget.py
[edit]
[-] macosxSupport.py
[edit]
[-] configHelpSourceEdit.py
[edit]
[-] PyParse.py
[edit]
[-] WidgetRedirector.py
[edit]
[-] config-keys.def
[edit]
[-] keybindingDialog.py
[edit]
[-] aboutDialog.py
[edit]
[-] OutputWindow.py
[edit]
[-] README.txt
[edit]
[-] configDialog.py
[edit]
[-] RstripExtension.py
[edit]
[-] ScriptBinding.py
[edit]
[-] SearchDialogBase.py
[edit]
[-] ColorDelegator.py
[edit]
[-] FormatParagraph.py
[edit]
[-] HyperParser.py
[edit]
[-] rpc.py
[edit]
[-] ClassBrowser.py
[edit]
[-] help.txt
[edit]
[-] __init__.py
[edit]
[-] HISTORY.txt
[edit]
[-] Delegator.py
[edit]
[-] TODO.txt
[edit]
[-] RemoteDebugger.py
[edit]
[-] ScrolledList.py
[edit]
[-] ReplaceDialog.py
[edit]
[-] ZoomHeight.py
[edit]
[-] config-highlight.def
[edit]
[-] ChangeLog
[edit]
[-] SearchDialog.py
[edit]
[-] AutoCompleteWindow.py
[edit]
[-] configHandler.py
[edit]
[-] SearchEngine.py
[edit]