Ejemplo n.º 1
0
def onPopup(event):
    global popup_window
    popup_window = ew.WxPopup(u"Popup Window", 200, 160)
    popup_window.makeLayout(popup_layout)
    label = ew.getWxCtrl('popup_label')
    label.SetBackgroundColour(wx.Colour(200, 240, 240))
    popup_window.show()
Ejemplo n.º 2
0
def onOpen(event):
    tree = ezwx.getWxCtrl('tree')
    if tree is not None:
        root = tree.AddRoot('Root')
        for i in range(10):
            name1 = 'Item_' + str(i)
            node = tree.AppendItem(root, name1)
            for k in range(10):
                name2 = name1 + '_' + str(k)
                tree.AppendItem(node, name2)
        tree.ExpandAllChildren(root)
Ejemplo n.º 3
0
def onFontSelect(event):
    ctrl = ezwx.getWxCtrl('font')
    font = event.GetFont()
    print(font.GetFaceName(), font.GetFamily(), font.GetPixelSize(),
          font.GetPointSize())
    font = ctrl.GetSelectedFont()
    print(font.GetFaceName(), font.GetFamily(), font.GetPixelSize(),
          font.GetPointSize())
    font = ctrl.GetFont()
    print(font.GetFaceName(), font.GetFamily(), font.GetPixelSize(),
          font.GetPointSize())
Ejemplo n.º 4
0
def findCtrls():
    global status, addr, video, url, progress, volume, timer, time
    status = window.statusbar
    addr = ew.getWxCtrl('addr')
    video = ew.getWxCtrl('media')
    video.SetVolume(0.5)
    url = ew.getWxCtrl('url')
    progress = ew.getWxCtrl('progress')
    progress.SetRange(0, 1000)
    progress.SetValue(0)
    volume = ew.getWxCtrl('volume')
    volume.SetRange(0, 100)
    volume.SetValue(100 * video.GetVolume())
    time = ew.getWxCtrl('time')
Ejemplo n.º 5
0
def onFileSelect2(event):
    ctrl = ezwx.getWxCtrl('file2')
    print(event.GetPath())
    print(ctrl.GetPath())
Ejemplo n.º 6
0
def findCtrls():
    global status, text
    status = appWin.statusbar
    text = ew.getWxCtrl('text')
Ejemplo n.º 7
0
def initCtrls():
    global label, runcount
    label = ew.getWxCtrl('label')
    label.SetBackgroundColour(wx.Colour(200,200,240))
    runcount = 0
Ejemplo n.º 8
0
def onCopy(event):
    setStatusText("Copy", 0)
    stc = ezwx.getWxCtrl('stc')
    if stc is not None:
        stc.Copy()
Ejemplo n.º 9
0
def onOpen(event):
    filename = ezwx.OpenFileDialog()
    if filename is not None:
        stc = ezwx.getWxCtrl('stc')
Ejemplo n.º 10
0
def getTextValue(key):
    ctrl = ezwx.getWxCtrl(key)
    if ctrl is not None:
        return ctrl.GetLineText(0)
    return None
Ejemplo n.º 11
0
def initCtrls():
    global cal
    cal = ew.getWxCtrl('cal')
    cal.SetBackgroundColour(wx.Colour(200,200,240))
Ejemplo n.º 12
0
def findCtrls():
    global addr, web, text
    addr = ew.getWxCtrl('addr')
    web = ew.getWxCtrl('web')
    text = ew.getWxCtrl('text')
Ejemplo n.º 13
0
def onTimer(event):
    global number
    led = ew.getWxCtrl('led')
    led.SetValue("00:" + str(number))
    number += 1
Ejemplo n.º 14
0
def onFont(event):
    font = ew.getWxCtrl('font')
    appWin.setTickerFont('ticker',font.GetSelectedFont())
Ejemplo n.º 15
0
def onTimeSelect2(event):
    ctrl = ezwx.getWxCtrl('time2')
    print(event.GetDate())
    print(ctrl.GetValue())
Ejemplo n.º 16
0
def onHomeButton(event):
    folder = ezwx.DirectoryDialog()
    if folder is not None:
        ctrl = ezwx.getWxCtrl('home')
        if ctrl is not None:
            ctrl.write(folder)
Ejemplo n.º 17
0
def initCtrls():
    ew.getWxCtrl('top1').SetBackgroundColour(wx.Colour(200,200,240))
Ejemplo n.º 18
0
def AppendToText(text):
    ctrl = ezwx.getWxCtrl('text')
    if ctrl is not None:
        ctrl.write(text + "\n")
Ejemplo n.º 19
0
def initCtrls():
    ew.getWxCtrl('top1').SetBackgroundColour(wx.Colour(200, 200, 240))
    ew.getWxCtrl('top2').SetBackgroundColour(wx.Colour(180, 180, 240))
    ew.getWxCtrl('top3').SetBackgroundColour(wx.Colour(160, 160, 240))
    ew.getWxCtrl('mid').SetBackgroundColour(wx.Colour(200, 240, 200))
    ew.getWxCtrl('mid2').SetBackgroundColour(wx.Colour(200, 240, 240))
    ew.getWxCtrl('bottom1').SetBackgroundColour(wx.Colour(240, 200, 200))
    ew.getWxCtrl('bottom21').SetBackgroundColour(wx.Colour(240, 180, 180))
    ew.getWxCtrl('bottom22').SetBackgroundColour(wx.Colour(240, 180, 180))
    ew.getWxCtrl('bottom23').SetBackgroundColour(wx.Colour(240, 180, 180))
    ew.getWxCtrl('bottom3').SetBackgroundColour(wx.Colour(240, 160, 160))
    ew.getWxCtrl('extra1').SetBackgroundColour(wx.Colour(240, 240, 200))
    ew.getWxCtrl('extra21').SetBackgroundColour(wx.Colour(240, 240, 180))
    ew.getWxCtrl('extra22').SetBackgroundColour(wx.Colour(240, 240, 180))
    ew.getWxCtrl('extra23').SetBackgroundColour(wx.Colour(240, 240, 180))
    ew.getWxCtrl('extra3').SetBackgroundColour(wx.Colour(240, 240, 160))
Ejemplo n.º 20
0
def onDirBrowse(filename):
    browser = ew.getWxCtrl('dir')
    text = ew.getWxCtrl('text')
    text.AppendText(browser.GetValue() + "\n")
    text.AppendText(filename + "\n")
Ejemplo n.º 21
0
def onDateSelect(event):
    ctrl = ezwx.getWxCtrl('date')
    print(event.GetDate())
    print(ctrl.GetValue())
Ejemplo n.º 22
0
def onClear(event):
    setStatusText("Clear", 0)
    stc = ezwx.getWxCtrl('stc')
    if stc is not None:
        stc.ClearAll()
Ejemplo n.º 23
0
def onColorSelect(event):
    ctrl = ezwx.getWxCtrl('color')
    print(event.GetColour())
    print(ctrl.GetColour())
Ejemplo n.º 24
0
def onPaste(event):
    setStatusText("Paste", 0)
    stc = ezwx.getWxCtrl('stc')
    if stc is not None:
        stc.Paste()
Ejemplo n.º 25
0
def onDirSelect2(event):
    ctrl = ezwx.getWxCtrl('dir2')
    print(event.GetPath())
    print(ctrl.GetPath())
Ejemplo n.º 26
0
def initCtrls():
    global label, idlecount, timercount
    label = ew.getWxCtrl('label')
    label.SetBackgroundColour(wx.Colour(200, 200, 240))
    idlecount = 0
    timercount = 0
Ejemplo n.º 27
0
def findControls():
    global web
    global addr
    web = ezwx.getWxCtrl('web')
    addr = ezwx.getWxCtrl('addr')