Esempio n. 1
0
]

body_def = [
    [
        ew.FileBrowser("Icon Folder: ",
                       "",
                       "Browse",
                       key='folder',
                       directory=True,
                       expand=True,
                       proportion=1)
    ],
    [
        ew.Text(expand=True,
                proportion=1,
                multiline=True,
                readonly=True,
                key="text"), {
                    'expand': True,
                    'proportion': 1
                }
    ],
    [None, ew.Button("Make", handler=onMake, expand=True)],
]

layout = {
    "menu": menu_def,
    "status": status_def,
    "body": body_def,
}
Esempio n. 2
0
                                   value=value)
    appWin.appendText('text', value + '\n')


menu_def = {
    "File": {
        "Exit": [onExit, wx.ART_QUIT],
    },
    "Help": {
        "About": onAbout
    },
}

body_def = [
    [
        ew.Text('Default Value', expand=True, proportion=1, key='deftext'),
        ew.Button("Dialog", handler=onButton, key='button'),
    ],
    [ew.Line()],
    [
        ew.Text('', multiline=True, expand=True, proportion=1, key='text'), {
            'expand': True,
            'proportion': 1
        }
    ],
]

status_def = [
    ["Ready", -1],
]
Esempio n. 3
0
    appWin.appendText('text', directory + '\n')


menu_def = {
    "File": {
        "Exit": [onExit, wx.ART_QUIT],
    },
    "Help": {
        "About": onAbout
    },
}

body_def = [
    [
        ew.Label("Default Dir:"),
        ew.Text("D:\\", expand=True, proportion=1, key='dir'),
        ew.Button("Open", handler=onButton),
    ],
    [
        ew.Text('', multiline=True, expand=True, proportion=1, key='text'), {
            'expand': True,
            'proportion': 1
        }
    ],
]

status_def = [
    ["Ready", -1],
]

layout = {
Esempio n. 4
0
    "File": {
        "Exit": onExit,
    },
    "Help": {
        "About": onAbout
    },
}

status_def = [
    ["Ready", -1],
]

body_def = [
    [
        ezwx.Label("IP Address: "),
        ezwx.Text("127.0.0.1", key='host'),
        ezwx.Label("Port: "),
        ezwx.Text("21", key='port', size=(32, 12)),
        ezwx.Label("Id: "),
        ezwx.Text("user", key='user'),
        ezwx.Label("Password: "******"1234", key='passwd', password=True),
    ],
    [
        ezwx.Label("Home Folder: "),
        ezwx.Text("", key='home', proportion=1),
        ezwx.Button("Browse", handler=onHomeButton),
        ezwx.Button("Start", handler=onStartButton),
    ],
    [
        ezwx.Text(expand=True,
Esempio n. 5
0
tool_def = [  #icon, text, handler
    [wx.ART_GO_HOME, onHome, "Stop"],
    [wx.ART_GO_BACK, onBack, "Pause"],
    [wx.ART_GO_FORWARD, onForward, "Play"],
]

status_def = [
    ["Ready", -1],
]

def_url = r'D:/video.wmv'

body_def = [
    [
        ew.Label("Address: "),
        ew.Text(def_url, expand=True, proportion=1, key="url"),
        ew.Button("Load", handler=onLoad),
    ],
    [
        ew.Media(def_url, expand=True, proportion=1, key='media'), {
            'expand': True,
            'proportion': 1
        }
    ],
    [
        ew.Label("00:00:00", key='time'),
        ew.Slider(expand=True,
                  proportion=1,
                  handler=onProgress,
                  key='progress'),
        ew.Label("Volume: "),
Esempio n. 6
0
    elif action == 'setBgColor':
        ew.setBgColor(kind,wx.Colour(255,0,0))
        
menu_def = { 
    "File" : { 
        "Exit" : [ onExit, wx.ART_QUIT ],
    }, 
    "Help" : { 
        "About" : onAbout 
    },
}

body_def = [
    [ ew.Choice(['label','button','toggle','check','text','choice','combo','list','date','time'], key='kind'),
      ew.Choice(['getLabel','setLabel','getValue','setValue','appendValue','removeValue','setFgColor','setBgColor'], key='action'),
      ew.Text("",key='value'),
      ew.Button("Go",handler=onGo),
    ], 
    [ ew.Label("Label: ",expand=True),
      ew.Label("Value",expand=True,proportion=1,key='label',size=(64,-1)), ],
    [ ew.Label("Button: ",expand=True),
      ew.Button("Button",expand=True,proportion=1,key='button',size=(64,-1)), ],
    [ ew.Label("ToggleButton: ",expand=True),
      ew.ToggleButton("ToggleButton",value=True,expand=True,proportion=1,key='toggle',size=(64,-1)), ],
    [ ew.Label("CheckButton: ",expand=True),
      ew.CheckButton("CheckButton",value=True,expand=True,proportion=1,key='check',size=(64,-1)), ],
    [ ew.Label("Text: ",expand=True),
      ew.Text("Text",expand=True,proportion=1,key='text',size=(64,-1)), ],
    [ ew.Label("Choice: ",expand=True),
      ew.Choice(['apple','lemon'],expand=True,size=(64,-1),proportion=1,key='choice'), ],
    [ ew.Label("Combo: ",expand=True),
Esempio n. 7
0
    date = cal.GetDate()
    appWin.appendText('text', date.Format('[%Y-%m-%d]\n'))
    
menu_def = { 
    "File" : { 
        "Exit" : [ onExit, wx.ART_QUIT ],
    }, 
    "Help" : { 
        "About" : onAbout 
    },
}

body_def = [
    [ ew.Calendar(handler=onCalendar,expand=True,proportion=1,key='cal'), ],
    [ ew.Button('GetDate',handler=onGetDate,expand=True,proportion=1), ],
    [ ew.Text("",multiline=True,expand=True,proportion=1,key='text'), 
      { 'expand' : True, 'proportion' : 1 }
    ],
]

status_def = [
    ["Ready", -1],
]

layout = {
    "menu"   : menu_def,
    "body"   : body_def, 
    "status"   : status_def, 
}

######################################################################
Esempio n. 8
0
tool_def = [  #icon, text, handler
    [wx.ART_GO_HOME, onHome, "Home"],
    [wx.ART_GO_FORWARD, onForward, "Forward"],
]

status_def = [
    ["Ready", -1],
]

url = r'D:/video.mp4'

body_def = [
    [
        ew.Label("Address: "),
        ew.Text(url, key="addr", expand=True, proportion=1),
        ew.Button("Go", handler=onGo),
    ],
    [
        ew.VerticalSpliter([
            600,
            [
                [
                    ew.Media(url, key='web', expand=True, proportion=1), {
                        'expand': True,
                        'proportion': 1
                    }
                ],
            ],
        ],
                           expand=True,
Esempio n. 9
0
def onLeft(event):
    appWin.setTickerDirection('ticker','left')
    
menu_def = { 
    "File" : { 
        "Exit" : [ onExit, wx.ART_QUIT ],
    }, 
    "Help" : { 
        "About" : onAbout 
    },
}

body_def = [
    [ ew.Ticker(text="Default Ticker Text",fgcolor=wx.BLACK,bgcolor=wx.WHITE,key='ticker',expand=True,proportion=1,) ],
    [ ew.Line() ],
    [ ew.Text('New Ticker Value', expand=True,proportion=1,key='deftext'), 
      ew.Button("Apply",handler=onTextApply), ],
    [ ew.Label("PPF: "),
      ew.Text('2', expand=True,key='ppf',size=(32,-1)), 
      ew.Button("Apply",handler=onPPFApply,size=(64,-1)), 
      ew.Label("FPS: "),
      ew.Text('20', expand=True,key='fps',size=(64,-1)), 
      ew.Button("Apply",handler=onFPSApply,size=(64,-1)), 
      ew.Label("Font: "),
      ew.FontPicker(handler=onFont,key='font'), 
      ],
    [ None,
      ew.Button("Start",handler=onStart),
      ew.Button("Stop",handler=onStop),
      ew.Button("L > R",handler=onRight),
      ew.Button("L < R",handler=onLeft),
Esempio n. 10
0
menu_def = { 
    "File" : { 
        "Exit" : onExit,
        }, 
    "Help" : { 
        "About" : onAbout 
        },
}

status_def = [
    ["Ready", -1],
]

body_def = [
    [ ezwx.Text("",expand=True,proportion=1,key="text"),
      { 'expand' : True, 'proportion' : 1 } ], 
]

layout = {
    "menu"   : menu_def,
    "status" : status_def, 
    "body"   : body_def, 
}

######################################################################
# Main
######################################################################

if __name__ == "__main__":
    window = ezwx.WxApp(u"wxPython Template", 600, 480)
Esempio n. 11
0
    },
}

status_def = [
    ["Ready", -1],
]

body_def = [
    [
        ezwx.Button('Home', handler=onHome),
        ezwx.Button('Back', handler=onBack),
        ezwx.Button('Forward', handler=onForward),
    ],
    [
        ezwx.Label('Address: '),
        ezwx.Text('https://www.google.com', proportion=1, key='addr'),
        ezwx.Button('Go', handler=onGo),
    ],
    [
        ezwx.Web("https://www.google.com",
                 expand=True,
                 proportion=1,
                 key="web"), {
                     'expand': True,
                     'proportion': 1
                 }
    ],
]

layout = {
    "menu": menu_def,