Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WebRadioPi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thorfin89
WebRadioPi
Commits
518e54dd
Commit
518e54dd
authored
Jan 12, 2023
by
Thorfin89
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Placement des boutons avec place de Tkinter
parent
bceb1fa1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
init
init
+1
-1
rw_pupitre.py
rw_pupitre.py
+17
-8
No files found.
init
View file @
518e54dd
60
43
\ No newline at end of file
\ No newline at end of file
rw_pupitre.py
View file @
518e54dd
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
# import ----------------------------------
# import ----------------------------------
import
tkinter
as
tk
import
tkinter
as
tk
from
tkinter
import
ttk
,
Scale
,
HORIZONTAL
,
LEFT
,
RIGHT
,
TOP
from
tkinter
import
ttk
,
Scale
,
HORIZONTAL
,
CENTER
,
LEFT
,
RIGHT
,
TOP
,
OUTSIDE
# classes ---------------------------------
# classes ---------------------------------
...
@@ -43,24 +43,33 @@ class Pupitre:
...
@@ -43,24 +43,33 @@ class Pupitre:
menu
=
tk
.
Frame
(
self
.
root
,
width
=
"300"
,
height
=
"400"
)
menu
=
tk
.
Frame
(
self
.
root
,
width
=
"300"
,
height
=
"400"
)
menu
.
pack
(
side
=
RIGHT
,
expand
=
'True'
)
menu
.
pack
(
side
=
RIGHT
,
expand
=
'True'
)
x_menu
=
30
y_menu
=
100
# boutons de commande
# boutons de commande
btn_play
=
ttk
.
Button
(
menu
,
image
=
self
.
icon_play
,
text
=
"Play"
,
command
=
self
.
radio_play
)
btn_play
=
ttk
.
Button
(
menu
,
image
=
self
.
icon_play
,
text
=
"Play"
,
command
=
self
.
radio_play
)
btn_play
.
grid
(
row
=
1
,
column
=
0
)
btn_play
.
place
(
bordermode
=
OUTSIDE
,
width
=
80
,
height
=
80
,
x
=
x_menu
+
0
,
y
=
y_menu
+
0
)
btn_pause
=
ttk
.
Button
(
menu
,
image
=
self
.
icon_pause
,
text
=
"Pause"
,
command
=
self
.
radio_pause
)
btn_pause
=
ttk
.
Button
(
menu
,
image
=
self
.
icon_pause
,
text
=
"Pause"
,
command
=
self
.
radio_pause
)
btn_pause
.
grid
(
row
=
1
,
column
=
1
)
btn_pause
.
place
(
bordermode
=
OUTSIDE
,
width
=
80
,
height
=
80
,
x
=
x_menu
+
80
,
y
=
y_menu
+
0
)
btn_stop
=
ttk
.
Button
(
menu
,
image
=
self
.
icon_stop
,
text
=
"Stop"
,
command
=
self
.
radio_stop
)
btn_stop
=
ttk
.
Button
(
menu
,
image
=
self
.
icon_stop
,
text
=
"Stop"
,
command
=
self
.
radio_stop
)
btn_stop
.
grid
(
row
=
1
,
column
=
2
)
btn_stop
.
place
(
bordermode
=
OUTSIDE
,
width
=
80
,
height
=
80
,
x
=
x_menu
+
160
,
y
=
y_menu
+
0
)
# potentiomètre de volume
# potentiomètre de volume
lecture
=
open
(
"init"
,
"r"
)
# on charge configuration sauvegardée
lecture
=
open
(
"init"
,
"r"
)
# on charge configuration sauvegardée
volume_init
=
lecture
.
read
()
volume_init
=
lecture
.
read
()
lecture
.
close
()
lecture
.
close
()
vol_potar
=
Scale
(
menu
,
from_
=
0
,
to
=
100
,
tickinterval
=
20
,
orient
=
HORIZONTAL
,
length
=
2
06
,
label
=
"Volume"
,
vol_potar
=
Scale
(
menu
,
from_
=
0
,
to
=
100
,
tickinterval
=
20
,
orient
=
HORIZONTAL
,
length
=
2
40
,
label
=
"Volume"
,
command
=
self
.
volume
)
command
=
self
.
volume
)
vol_potar
.
set
(
volume_init
)
vol_potar
.
set
(
volume_init
)
vol_potar
.
grid
(
row
=
2
,
column
=
0
,
columnspan
=
3
)
vol_potar
.
place
(
bordermode
=
OUTSIDE
,
x
=
x_menu
+
0
,
y
=
y_menu
+
90
)
# boutons de coupure et rétablissement du son
btn_stop
=
ttk
.
Button
(
menu
,
image
=
self
.
icon_mute
,
text
=
"Mute"
,
command
=
self
.
radio_mute
)
btn_stop
=
ttk
.
Button
(
menu
,
image
=
self
.
icon_mute
,
text
=
"Mute"
,
command
=
self
.
radio_mute
)
btn_stop
.
grid
(
row
=
3
,
column
=
1
)
btn_stop
.
place
(
bordermode
=
OUTSIDE
,
width
=
80
,
height
=
80
,
x
=
x_menu
+
40
,
y
=
y_menu
+
170
)
btn_stop
=
ttk
.
Button
(
menu
,
image
=
self
.
icon_sound
,
text
=
"Sound"
,
command
=
self
.
radio_sound
)
btn_stop
=
ttk
.
Button
(
menu
,
image
=
self
.
icon_sound
,
text
=
"Sound"
,
command
=
self
.
radio_sound
)
btn_stop
.
grid
(
row
=
3
,
column
=
2
)
btn_stop
.
place
(
bordermode
=
OUTSIDE
,
width
=
80
,
height
=
80
,
x
=
x_menu
+
120
,
y
=
y_menu
+
170
)
# info appli
lbl_info
=
ttk
.
Label
(
menu
,
text
=
"WebRadioPi @thorfin89"
,
anchor
=
CENTER
)
lbl_info
.
place
(
bordermode
=
OUTSIDE
,
width
=
240
,
height
=
16
,
x
=
x_menu
+
0
,
y
=
y_menu
+
275
)
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