OpenCores
URL https://opencores.org/ocsvn/phr/phr/trunk

Subversion Repositories phr

[/] [phr/] [trunk/] [codigo/] [gui/] [windows/] [minimal python2.7.6/] [wx_simple_gui/] [prueba_corregido.py] - Blame information for rev 172

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 172 maximiq
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
# generated by wxGlade 0.6.3 on Tue Mar 18 21:30:25 2014
4
 
5
import wx
6
 
7
# begin wxGlade: extracode
8
# end wxGlade
9
 
10
 
11
 
12
class MyFrame(wx.Frame):
13
    def __init__(self, *args, **kwds):
14
        # begin wxGlade: MyFrame.__init__
15
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
16
        wx.Frame.__init__(self, *args, **kwds)
17
        self.frame_1_statusbar = self.CreateStatusBar(1, 0)
18
        self.bitmap_1 = wx.StaticBitmap(self, -1, wx.Bitmap("imagen.jpg", wx.BITMAP_TYPE_ANY))
19
        self.label_1 = wx.StaticText(self, -1, "Aca puede ir algo de texto para aclarar como es el \nprocedimiento para hacer andar el programa.")
20
        self.text_ctrl_3 = wx.TextCtrl(self, -1, "")
21
        self.button_3 = wx.Button(self, -1, "Elegir fichero")
22
        self.button_4 = wx.Button(self, -1, "Grabar")
23
        self.text_ctrl_2 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER|wx.TE_MULTILINE)
24
 
25
        self.__set_properties()
26
        self.__do_layout()
27
 
28
        self.Bind(wx.EVT_BUTTON, self.choose_file_button, self.button_3)
29
        self.Bind(wx.EVT_BUTTON, self.action_button, self.button_4)
30
        # end wxGlade
31
 
32
    def __set_properties(self):
33
        # begin wxGlade: MyFrame.__set_properties
34
        self.SetTitle("Titulo de la ventana")
35
        self.frame_1_statusbar.SetStatusWidths([-1])
36
        # statusbar fields
37
        frame_1_statusbar_fields = ["frame_1_statusbar"]
38
        for i in range(len(frame_1_statusbar_fields)):
39
            self.frame_1_statusbar.SetStatusText(frame_1_statusbar_fields[i], i)
40
        self.text_ctrl_2.SetMinSize((350, 135))
41
        # end wxGlade
42
 
43
    def __do_layout(self):
44
        # begin wxGlade: MyFrame.__do_layout
45
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
46
        grid_sizer_1 = wx.FlexGridSizer(5, 1, 0, 0)
47
        grid_sizer_2 = wx.FlexGridSizer(1, 3, 0, 0)
48
        grid_sizer_1.Add(self.bitmap_1, 0, wx.ALL, 5)
49
        grid_sizer_1.Add(self.label_1, 0, wx.ALL, 5)
50
        grid_sizer_2.Add(self.text_ctrl_3, 0, wx.ALL|wx.EXPAND, 5)
51
        grid_sizer_2.Add(self.button_3, 0, wx.RIGHT|wx.TOP|wx.BOTTOM, 5)
52
        grid_sizer_2.Add(self.button_4, 0, wx.RIGHT|wx.TOP|wx.BOTTOM, 5)
53
        grid_sizer_2.AddGrowableCol(0)
54
        grid_sizer_1.Add(grid_sizer_2, 1, wx.EXPAND, 0)
55
        grid_sizer_1.Add(self.text_ctrl_2, 0, wx.ALL|wx.EXPAND, 5)
56
        sizer_1.Add(grid_sizer_1, 1, wx.EXPAND, 0)
57
        self.SetSizer(sizer_1)
58
        sizer_1.Fit(self)
59
        self.Layout()
60
        self.Centre()
61
        # end wxGlade
62
 
63
    def choose_file_button(self, event): # wxGlade: MyFrame.<event_handler>
64
        print "Event handler `choose_file_button' not implemented"
65
        event.Skip()
66
 
67
    def action_button(self, event): # wxGlade: MyFrame.<event_handler>
68
        print "Event handler `action_button' not implemented"
69
        event.Skip()
70
 
71
# end of class MyFrame
72
 
73
 
74
if __name__ == "__main__":
75
    app = wx.App(False)
76
    #wx.InitAllImageHandlers()
77
    frame_1 = MyFrame(None, -1, "")
78
    app.SetTopWindow(frame_1)
79
    frame_1.Show()
80
    app.MainLoop()

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.