FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
code-guild/code-guild/python/tkinter/window.py at master · grantholly/code-guild · GitHub
grantholly
code-guild
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
code-guild
/
code-guild
/
python
/
tkinter
/
window.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (29 loc) · 1 KB
Breadcrumbs
code-guild
/
code-guild
/
python
/
tkinter
/
window.py
Copy path
File metadata and controls
38 lines (29 loc) · 1 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from
Tkinter
import
Tk
,
RIGHT
,
BOTH
,
RAISED
from
ttk
import
Frame
,
Button
,
Style
class
Example
(
Frame
):
def
__init__
(
self
,
parent
):
Frame
.
__init__
(
self
,
parent
)
self
.
parent
=
parent
self
.
initUI
()
def
initUI
(
self
):
self
.
parent
.
title
(
"window"
)
self
.
style
=
Style
()
self
.
style
.
theme_use
(
"default"
)
frame
=
Frame
(
self
,
relief
=
RAISED
,
borderwidth
=
1
)
frame
.
pack
(
fill
=
BOTH
,
expand
=
1
)
self
.
pack
(
fill
=
BOTH
,
expand
=
1
)
# make two buttons that don't do anything yet
# set the butons using a style manager class
close_button
=
Button
(
self
,
text
=
"Close"
)
# add 5px of padding on the x and y
# set the buttons on the RIGHT side
close_button
.
pack
(
side
=
RIGHT
,
padx
=
5
,
pady
=
5
)
ok_button
=
Button
(
self
,
text
=
"OK"
)
ok_button
.
pack
(
side
=
RIGHT
)
def
main
():
root
=
Tk
()
root
.
geometry
(
"300x300+300+300"
)
app
=
Example
(
root
)
root
.
mainloop
()
if
__name__
==
"__main__"
:
main
()
Back
|
FazBrowse Home
|
New Git URL