Esempio n. 1
0
    def PlayerPlaybackGUIStart(self, NumFiles=1):
        # -------  Make a new FlexForm  ------- #

        image_pause = './ButtonGraphics/Pause.png'
        image_restart = './ButtonGraphics/Restart.png'
        image_next = './ButtonGraphics/Next.png'
        image_exit = './ButtonGraphics/Exit.png'

        self.TextElem = sg.T('Song loading....',
                             size=(70, 5 + NumFiles),
                             font=("Helvetica", 14),
                             auto_size_text=False)
        self.SliderElem = sg.Slider(range=(1, 100),
                                    size=(50, 8),
                                    orientation='h',
                                    text_color='#f0f0f0')
        layout = [[
            sg.T('MIDI File Player', size=(30, 1), font=("Helvetica", 25))
        ], [self.TextElem], [self.SliderElem],
                  [
                      sg.ReadFormButton('PAUSE',
                                        button_color=sg.TRANSPARENT_BUTTON,
                                        image_filename=image_pause,
                                        image_size=(50, 50),
                                        image_subsample=2,
                                        border_width=0),
                      sg.T(' '),
                      sg.ReadFormButton('NEXT',
                                        button_color=sg.TRANSPARENT_BUTTON,
                                        image_filename=image_next,
                                        image_size=(50, 50),
                                        image_subsample=2,
                                        border_width=0),
                      sg.T(' '),
                      sg.ReadFormButton('Restart Song',
                                        button_color=sg.TRANSPARENT_BUTTON,
                                        image_filename=image_restart,
                                        image_size=(50, 50),
                                        image_subsample=2,
                                        border_width=0),
                      sg.T(' '),
                      sg.SimpleButton(
                          'EXIT',
                          button_color=sg.TRANSPARENT_BUTTON,
                          image_filename=image_exit,
                          image_size=(50, 50),
                          image_subsample=2,
                          border_width=0,
                      )
                  ]]

        window = sg.FlexForm('MIDI File Player',
                             default_element_size=(30, 1),
                             font=("Helvetica", 25)).Layout(layout).Finalize()
        self.Window = window
Esempio n. 2
0
        tkinter_available = os.path.exists(tk) and os.path.exists(tcl)
    except:
        pass


message = sg.Text("", size=(60, 1))
frm_input = sg.InputText("", key="py-file", do_not_clear=False)
frm_output = sg.InputText("", key="compile-to", do_not_clear=True)
frm_icon = sg.InputText("", key="icon-file", do_not_clear=True)
frm_follow = sg.InputText("", size=(60, 2), key="follow", do_not_clear=True)
frm_no_follow = sg.InputText("", size=(60, 2), key="no-follow", do_not_clear=True)
frm_packages = sg.InputText("", size=(60, 2), key="packages", do_not_clear=True)
frm_modules = sg.InputText("", size=(60, 2), key="modules", do_not_clear=True)
frm_plugins = sg.InputText("", size=(60, 2), key="plugin-dir", do_not_clear=True)
frm_more = sg.InputText("", key="add-args", size=(60, 2), do_not_clear=True)
form = sg.FlexForm("Nuitka Standalone EXE Generation")

compile_to = pscript = icon_file = ""

layout = [
    [
        sg.Text("Python Script:", size=(13, 1)),
        sg.InputText("", key="py-file", do_not_clear=True),
        sg.FileBrowse(button_text="...", file_types=(("Python Files", "*.py*"),)),
    ],
    [
        sg.Text("Output Folder:", size=(13, 1)),
        frm_output,
        sg.FolderBrowse(button_text="..."),
    ],
    [sg.Text("Icon File:", size=(13, 1)), frm_icon, sg.FileBrowse(button_text="...")],
Esempio n. 3
0
import PySimpleGUI27 as sg

form = sg.FlexForm('My first GUI')

layout = [[sg.Text('Enter your name'), sg.InputText()], [sg.OK()]]

button, (name, ) = form.LayoutAndRead(layout)