| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 
 | #!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
# generated by wxGlade 0.5 on Wed Sep 26 22:17:31 2007 from D:\python\cutline\cutline03.wxg
 
import wx,time
 
class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.pnl = wx.Panel(self)
        self.label_1 = wx.StaticText(self.pnl, -1, "  Fichier source")
        self.button_1 = wx.Button(self.pnl, -1, "Parcourir")
        self.text_ctrl_1 = wx.TextCtrl(self.pnl, -1, "")
        self.label_2 = wx.StaticText(self.pnl, -1, "  Garder une ligne sur")
        self.label_5 = wx.StaticText(self.pnl, -1, "..................")
        self.text_ctrl_2 = wx.TextCtrl(self.pnl, -1, "")
        self.label_3 = wx.StaticText(self.pnl, -1, "  Fichier destination")
        self.button_2 = wx.ToggleButton(self.pnl, -1, "Auto")
        self.text_ctrl_3 = wx.TextCtrl(self.pnl, -1, "")
        self.label_4 = wx.StaticText(self.pnl, -1, "  Etat")
        self.button_3 = wx.Button(self.pnl, -1, "Go")
        self.label_6 = wx.StaticText(self.pnl, -1, "  Cutline 1.0")
 
        self.__set_properties()
        self.__do_layout()
 
        self.Bind(wx.EVT_BUTTON, self.parcourir, self.button_1)
        self.Bind(wx.EVT_TOGGLEBUTTON, self.auto, self.button_2)
        self.Bind(wx.EVT_BUTTON, self.go, self.button_3)
 
 
        self.compteur=0
        # end wxGlade
 
    def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle("Cutline")
        self.SetBackgroundColour(wx.Colour(213, 213, 213))
        self.text_ctrl_1.SetMinSize((500, 24))
        self.text_ctrl_3.SetMinSize((500, 24))
        # end wxGlade
 
    def __do_layout(self):
        # begin wxGlade: MyFrame.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        grid_sizer_1 = wx.FlexGridSizer(4, 3, 2, 2)
        grid_sizer_1.Add(self.label_1, 0, 0, 0)
        grid_sizer_1.Add(self.button_1, 0, 0, 0)
        grid_sizer_1.Add(self.text_ctrl_1, 0, 0, 0)
        grid_sizer_1.Add(self.label_2, 0, 0, 0)
        grid_sizer_1.Add(self.label_5, 0, 0, 0)
        grid_sizer_1.Add(self.text_ctrl_2, 0, 0, 0)
        grid_sizer_1.Add(self.label_3, 0, 0, 0)
        grid_sizer_1.Add(self.button_2, 0, 0, 0)
        grid_sizer_1.Add(self.text_ctrl_3, 0, 0, 0)
        grid_sizer_1.Add(self.label_4, 0, 0, 0)
        grid_sizer_1.Add(self.button_3, 0, 0, 0)
        grid_sizer_1.Add(self.label_6, 0, 0, 0)
        sizer_1.Add(grid_sizer_1, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        sizer_1.Fit(self.pnl)
        self.Layout()
        # end wxGlade
 
    def auto(self, event): # wxGlade: MyFrame.<event_handler>
        print "Event handler `auto' not implemented"
        event.Skip()
 
    def parcourir(self, event): # wxGlade: MyFrame.<event_handler>
        print "Event handler `parcourir' not implemented"
        event.Skip()
 
    def go(self, event): # wxGlade: MyFrame.<event_handler>
        print "Event handler `go' not implemented"
        self.compteur+=1
        self.label_6.SetLabel(str(self.compteur))
        event.Skip()
 
# end of class MyFrame
 
 
if __name__ == "__main__":
    print "--------------"
    app = wx.App(0)
    wx.InitAllImageHandlers()
    frame_1 = MyFrame(None, -1, "")
    app.SetTopWindow(frame_1)
    frame_1.Show()
    app.MainLoop() | 
Partager