Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c034b47e
Commit
c034b47e
authored
Nov 03, 2001
by
Steven M. Gava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added ability to set hilightthickness
parent
9dd16b34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
Lib/idlelib/dynOptionMenuWidget.py
Lib/idlelib/dynOptionMenuWidget.py
+9
-3
No files found.
Lib/idlelib/dynOptionMenuWidget.py
View file @
c034b47e
##---------------------------------------------------------------------------##
##
## idle - tkinter OptionMenu widget modified to allow dynamic
## reconfiguration of menu.
## idle - modified OptionMenu widget
## elguavas
##
##---------------------------------------------------------------------------##
"""
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
):
"""
OptionMenu widget that allows dynamic menu reconfiguration
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
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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment