コード例 #1
0
                       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,
}

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

if __name__ == "__main__":
    appWin = ew.WxApp("Icon Maker", 600, 480)
    appWin.makeLayout(layout)
コード例 #2
0
    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],
]

layout = {
コード例 #3
0
ファイル: PopupWindow.py プロジェクト: zdivdev/ezWxPython
    "Help": {
        "About": onAbout
    },
}

body_def = [
    [
        ew.Label("Hello ezWxPython", expand=True, proportion=1, key='label'), {
            'expand': True,
            'proportion': 1
        }
    ],
    [
        ew.Button(
            "Popup Window",
            handler=onPopup,
            expand=True,
            proportion=1,
        ),
    ],
]

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

layout = {
    "menu": menu_def,
    "body": body_def,
    "status": status_def,
}
コード例 #4
0
ファイル: ProgressDialog.py プロジェクト: zdivdev/ezWxPython
        "Exit": onExit,
    },
    "Help": {
        "About": onAbout
    },
}

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

body_def = [
    [
        ezwx.Button("Show Progress",
                    expand=True,
                    proportion=1,
                    handler=onButton,
                    key="button"), {
                        'expand': True,
                        'proportion': 1
                    }
    ],
]

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

######################################################################
コード例 #5
0
ファイル: DirectoryDialog.py プロジェクト: zdivdev/ezWxPython

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 = {
    "menu": menu_def,
コード例 #6
0
ファイル: FtpServer.py プロジェクト: zdivdev/ezWxPython
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,
                  proportion=1,
                  multiline=True,
                  readonly=True,
                  key="text"), {
                      'expand': True,
                      'proportion': 1
                  }
    ],
]

layout = {
コード例 #7
0
ファイル: ControlDemo.py プロジェクト: zdivdev/ezWxPython
        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),
      ew.Combo(['apple','lemon'],expand=True,size=(64,-1),proportion=1,key='combo'),], 
コード例 #8
0
ファイル: Simplebook.py プロジェクト: zdivdev/ezWxPython
 [
     ew.Choice([
         'slide_to_left',
         'slide_to_right',
         'slide_to_top',
         'slide_to_bottom',
         'roll_to_left',
         'roll_to_right',
         'roll_to_top',
         'roll_to_bottom',
         'blend',
         'expand',
         'none',
     ],
               key='effect'),
     ew.Button('Book1', handler=onBook1),
     ew.Button('Book2', handler=onBook2),
 ],
 [
     ew.Simplebook([
         [
             [
                 ew.Label("Top1", expand=True, proportion=1, key='top1'),
                 ew.Label("Top2", expand=True, proportion=2, key='top2'),
                 ew.Label("Top3", expand=True, proportion=3, key='top3'), {
                     'expand': True,
                     'proportion': 1
                 }
             ],
             [
                 ew.Label("Mid", expand=True, proportion=1, key='mid'), {
コード例 #9
0
    [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: "),
        ew.Slider(expand=True, key='volume'),
コード例 #10
0
def onGetDate(event):
    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, 
}
コード例 #11
0
ファイル: MediaCtrl.py プロジェクト: zdivdev/ezWxPython
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,
                           proportion=1), {
コード例 #12
0
    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),
     ],       
コード例 #13
0
ファイル: Web.py プロジェクト: zdivdev/ezWxPython
menu_def = {
    "File": {
        "Exit": onExit,
    },
    "Help": {
        "About": onAbout
    },
}

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