def __init__(self):
     self.theme = sg.theme('DarkAmber')
     self.layout = [[sg.Text('Search Term', size=(10,1)), 
                     sg.Input(size=(45,1), focus=True, key="TERM"),
                     sg.Radio('Contains', group_id='choice', key='CONTAINS', default=True),
                     sg.Radio("Starts With", group_id='choice', key="STARTSWITH"),
                     sg.Radio("Ends With", group_id='choice', key="ENDSWITH")],
                     [sg.Text('Root Path', size=(10,1)), 
                     sg.Input('C:/', size=(45,1), key="PATH"), 
                     sg.FolderBrowse('Browse', size=(10,1)), 
                     sg.Button('Re-Index', size=(10,1), key="_INDEX_"), 
                     sg.Button('Search', size=(10,1), bind_return_key=True, key="_SEARCH_")],
                     [sg.Output(size=(50,100))]]
     
     self.window = sg.Window('File Search Engine').Layout(self.layout)
Exemple #2
0
 [
     sg.Text('All graphic widgets in one window!',
             size=(30, 1),
             justification='center',
             font=("Helvetica", 25),
             relief=sg.RELIEF_RIDGE)
 ], [sg.Text('Here is some text.... and a place to enter text')],
 [sg.InputText('This is my text')],
 [
     sg.Frame(layout=[[
         sg.Checkbox('Checkbox', size=(10, 1)),
         sg.Checkbox('My second checkbox!', default=True)
     ],
                      [
                          sg.Radio('My first Radio!     ',
                                   "RADIO1",
                                   default=True,
                                   size=(10, 1)),
                          sg.Radio('My second Radio!', "RADIO1")
                      ]],
              title='Options',
              title_color='red',
              relief=sg.RELIEF_SUNKEN,
              tooltip='Use these to set flags')
 ],
 [
     sg.Multiline(
         default_text=
         'This is the default Text should you decide not to type anything',
         size=(35, 3)),
     sg.Multiline(default_text='A second multi-line', size=(35, 3))
 ],