Page 378 -
P. 378

graphical interface elements







                               track = mixer.Sound(sound_file)
                               track_playing = IntVar()
                               track_button = Checkbutton(app, variable = track_playing,
                                                               command  = track_toggle,

                                                               text     = sound_file)
                               track_button.pack(side = LEFT)





            Add the code
            that implements
            the volume
            control here.



















                               def shutdown():
                                   track.stop()
                                   app.destroy()


                               app.protocol("WM_DELETE_WINDOW", shutdown)

                               app.mainloop()









                                                                                       you are here 4    343
   373   374   375   376   377   378   379   380   381   382   383