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.py] - Rev 390

Go to most recent revision | Compare with Previous | Blame | View Log

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# generated by wxGlade 0.6.3 on Tue Mar 18 21:30:25 2014
 
import wx
 
# begin wxGlade: extracode
# end wxGlade
 
 
 
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.frame_1_statusbar = self.CreateStatusBar(1, 0)
        self.bitmap_1 = wx.StaticBitmap(self, -1, wx.Bitmap("imagen.jpg", wx.BITMAP_TYPE_ANY))
        self.label_1 = wx.StaticText(self, -1, "Aca puede ir algo de texto para aclarar como es el \nprocedimiento para hacer andar el programa.")
        self.text_ctrl_3 = wx.TextCtrl(self, -1, "")
        self.button_3 = wx.Button(self, -1, "Elegir fichero")
        self.button_4 = wx.Button(self, -1, "Grabar")
        self.text_ctrl_2 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER|wx.TE_MULTILINE)
 
        self.__set_properties()
        self.__do_layout()
 
        self.Bind(wx.EVT_BUTTON, self.choose_file_button, self.button_3)
        self.Bind(wx.EVT_BUTTON, self.action_button, self.button_4)
        # end wxGlade
 
    def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle("Titulo de la ventana")
        self.frame_1_statusbar.SetStatusWidths([-1])
        # statusbar fields
        frame_1_statusbar_fields = ["frame_1_statusbar"]
        for i in range(len(frame_1_statusbar_fields)):
            self.frame_1_statusbar.SetStatusText(frame_1_statusbar_fields[i], i)
        self.text_ctrl_2.SetMinSize((350, 135))
        # end wxGlade
 
    def __do_layout(self):
        # begin wxGlade: MyFrame.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        grid_sizer_1 = wx.FlexGridSizer(5, 1, 0, 0)
        grid_sizer_2 = wx.FlexGridSizer(1, 3, 0, 0)
        grid_sizer_1.Add(self.bitmap_1, 0, wx.ALL, 5)
        grid_sizer_1.Add(self.label_1, 0, wx.ALL, 5)
        grid_sizer_2.Add(self.text_ctrl_3, 0, wx.ALL|wx.EXPAND, 5)
        grid_sizer_2.Add(self.button_3, 0, wx.RIGHT|wx.TOP|wx.BOTTOM, 5)
        grid_sizer_2.Add(self.button_4, 0, wx.RIGHT|wx.TOP|wx.BOTTOM, 5)
        grid_sizer_2.AddGrowableCol(0)
        grid_sizer_1.Add(grid_sizer_2, 1, wx.EXPAND, 0)
        grid_sizer_1.Add(self.text_ctrl_2, 0, wx.ALL|wx.EXPAND, 5)
        sizer_1.Add(grid_sizer_1, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        sizer_1.Fit(self)
        self.Layout()
        self.Centre()
        # end wxGlade
 
    def choose_file_button(self, event): # wxGlade: MyFrame.<event_handler>
        print "Event handler `choose_file_button' not implemented"
        event.Skip()
 
    def action_button(self, event): # wxGlade: MyFrame.<event_handler>
        print "Event handler `action_button' not implemented"
        event.Skip()
 
# end of class MyFrame
 
 
if __name__ == "__main__":
    app = wx.PySimpleApp(0)
    wx.InitAllImageHandlers()
    frame_1 = MyFrame(None, -1, "")
    app.SetTopWindow(frame_1)
    frame_1.Show()
    app.MainLoop()
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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