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
8220fdda
Commit
8220fdda
authored
Jul 13, 2001
by
Kurt B. Kaiser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py-cvs-rel2_1 (Rev 1.2) merge - whitespace normalization
parent
233bf2c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
Lib/idlelib/MultiStatusBar.py
Lib/idlelib/MultiStatusBar.py
+24
-24
No files found.
Lib/idlelib/MultiStatusBar.py
View file @
8220fdda
from
Tkinter
import
*
class
MultiStatusBar
(
Frame
):
def
__init__
(
self
,
master
=
None
,
**
kw
):
if
master
is
None
:
master
=
Tk
()
apply
(
Frame
.
__init__
,
(
self
,
master
),
kw
)
self
.
labels
=
{}
def
set_label
(
self
,
name
,
text
=
''
,
side
=
LEFT
):
if
not
self
.
labels
.
has_key
(
name
):
label
=
Label
(
self
,
bd
=
1
,
relief
=
SUNKEN
,
anchor
=
W
)
label
.
pack
(
side
=
side
)
self
.
labels
[
name
]
=
label
else
:
label
=
self
.
labels
[
name
]
label
.
config
(
text
=
text
)
def
__init__
(
self
,
master
=
None
,
**
kw
):
if
master
is
None
:
master
=
Tk
()
apply
(
Frame
.
__init__
,
(
self
,
master
),
kw
)
self
.
labels
=
{}
def
set_label
(
self
,
name
,
text
=
''
,
side
=
LEFT
):
if
not
self
.
labels
.
has_key
(
name
):
label
=
Label
(
self
,
bd
=
1
,
relief
=
SUNKEN
,
anchor
=
W
)
label
.
pack
(
side
=
side
)
self
.
labels
[
name
]
=
label
else
:
label
=
self
.
labels
[
name
]
label
.
config
(
text
=
text
)
def
_test
():
b
=
Frame
()
c
=
Text
(
b
)
c
.
pack
(
side
=
TOP
)
a
=
MultiStatusBar
(
b
)
a
.
set_label
(
"one"
,
"hello"
)
a
.
set_label
(
"two"
,
"world"
)
a
.
pack
(
side
=
BOTTOM
,
fill
=
X
)
b
.
pack
()
b
.
mainloop
()
b
=
Frame
()
c
=
Text
(
b
)
c
.
pack
(
side
=
TOP
)
a
=
MultiStatusBar
(
b
)
a
.
set_label
(
"one"
,
"hello"
)
a
.
set_label
(
"two"
,
"world"
)
a
.
pack
(
side
=
BOTTOM
,
fill
=
X
)
b
.
pack
()
b
.
mainloop
()
if
__name__
==
'__main__'
:
_test
()
_test
()
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