#!/usr/bin/env python
# -*- coding: ANSI_X3.4-1968 -*-
#
# generated by wxGlade 0.6.8 on Wed Aug 19 20:32:17 2015
#

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class Suma(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: Suma.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.label_7 = wx.StaticText(self, wx.ID_ANY, _("Suma de Dos Numeros"))
        self.label_8 = wx.StaticText(self, wx.ID_ANY, _("Primer Valor:"))
        self.TxtValor1 = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_9 = wx.StaticText(self, wx.ID_ANY, _("Segundo Valor:"))
        self.TxtValor2 = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_10 = wx.StaticText(self, wx.ID_ANY, _("Resultado:"))
        self.lblResultado = wx.StaticText(self, wx.ID_ANY, "")
        self.BtnCalcular = wx.Button(self, wx.ID_ANY, _("Sumar"))
        self.BtnCerrar = wx.Button(self, wx.ID_ANY, _("Cerrar"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.OnSumar, self.BtnCalcular)
        self.Bind(wx.EVT_BUTTON, self.OnCerrar, self.BtnCerrar)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: Suma.__set_properties
        self.SetTitle(_("Suma Dos Numeros"))
        self.SetSize((648, 390))
        self.label_7.SetFont(wx.Font(16, wx.MODERN, wx.NORMAL, wx.BOLD, 0, ""))
        self.lblResultado.SetForegroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DDKSHADOW))
        self.lblResultado.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD, 0, "Sans"))
        self.BtnCalcular.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD, 0, "Sans"))
        self.BtnCalcular.SetToolTipString(_("Calcular la Suma..."))
        self.BtnCerrar.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD, 0, ""))
        self.BtnCerrar.SetToolTipString(_("Cerrar la Aplicacion"))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: Suma.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.VERTICAL)
        grid_sizer_2 = wx.FlexGridSizer(1, 2, 0, 0)
        grid_sizer_1 = wx.FlexGridSizer(3, 2, 0, 0)
        sizer_2.Add(self.label_7, 0, wx.TOP | wx.BOTTOM | wx.ALIGN_CENTER_HORIZONTAL, 20)
        grid_sizer_1.Add(self.label_8, 0, 0, 0)
        grid_sizer_1.Add(self.TxtValor1, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.label_9, 0, 0, 0)
        grid_sizer_1.Add(self.TxtValor2, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.label_10, 0, 0, 0)
        grid_sizer_1.Add(self.lblResultado, 0, wx.ALIGN_RIGHT, 0)
        sizer_2.Add(grid_sizer_1, 1, wx.EXPAND, 0)
        grid_sizer_2.Add(self.BtnCalcular, 0, 0, 0)
        grid_sizer_2.Add(self.BtnCerrar, 0, 0, 0)
        sizer_2.Add(grid_sizer_2, 1, wx.EXPAND, 0)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        self.Layout()
        self.Centre()
        # end wxGlade

    def OnSumar(self, event):  # wxGlade: Suma.<event_handler>
        try:
            if (self.TxtValor1.GetValue()=="" or self.TxtValor2.GetValue()==""):
                MensajeVacio=wx.MessageDialog(self,'Casillas Vacias!','Error',Wx.OK)
                MensajeVacio.ShowModal()
                MensajeVacio.Destroy()
                self.TxtValor1.Clear()
                self.TxtValor2.Clear()
                self.TxtValor1.SetFocus()
            else:
                if self.TxtValor1.GetValue()==" ":
                    self.TxtValor1.GetValue()==0
                if self.TxtValor2.GetValue()==" ":
                    self.TxtValor2.GetValue()==0
                suma=float(self.TxtValor1.GetValue())+float(self.TxtValor2.GetValue())
                self.lblResultado.SetLabel(str(suma))
        except:
            mensajeError=wx.MessageDialog(self,'Ocurrio un Error!', 'Error', wx.OK)
            mensajeError.ShowModal()
            mensajeError.Destroy()
            self.TxtValor1.Clear()
            self.TxtValor2.Clear()
            self.TxtValor1.SetFocus()

    def OnCerrar(self, event):  # wxGlade: Suma.<event_handler>
        mensaje=wx.MessageDialog(self,'Gracias por usar la Aplicacion', 'Aviso', wx.OK)
        mensaje.ShowModal()
        mensaje.Destroy()
        self.Close()

# end of class Suma
if __name__ == "__main__":
    gettext.install("app") # replace with the appropriate catalog name

    app = wx.PySimpleApp(0)
    wx.InitAllImageHandlers()
    vtnPrincipal = Suma(None, wx.ID_ANY, "")
    app.SetTopWindow(vtnPrincipal)
    vtnPrincipal.Show()
    app.MainLoop()

5584cbcf813aa3211516a0846221e451f0c58bdf
<mask token>


class Suma(wx.Frame):
    <mask token>
    <mask token>
    <mask token>

    def OnSumar(self, event):
        try:
            if self.TxtValor1.GetValue() == '' or self.TxtValor2.GetValue(
                ) == '':
                MensajeVacio = wx.MessageDialog(self, 'Casillas Vacias!',
                    'Error', Wx.OK)
                MensajeVacio.ShowModal()
                MensajeVacio.Destroy()
                self.TxtValor1.Clear()
                self.TxtValor2.Clear()
                self.TxtValor1.SetFocus()
            else:
                if self.TxtValor1.GetValue() == ' ':
                    self.TxtValor1.GetValue() == 0
                if self.TxtValor2.GetValue() == ' ':
                    self.TxtValor2.GetValue() == 0
                suma = float(self.TxtValor1.GetValue()) + float(self.
                    TxtValor2.GetValue())
                self.lblResultado.SetLabel(str(suma))
        except:
            mensajeError = wx.MessageDialog(self, 'Ocurrio un Error!',
                'Error', wx.OK)
            mensajeError.ShowModal()
            mensajeError.Destroy()
            self.TxtValor1.Clear()
            self.TxtValor2.Clear()
            self.TxtValor1.SetFocus()
    <mask token>


<mask token>

<mask token>


class Suma(wx.Frame):

    def __init__(self, *args, **kwds):
        kwds['style'] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.label_7 = wx.StaticText(self, wx.ID_ANY, _('Suma de Dos Numeros'))
        self.label_8 = wx.StaticText(self, wx.ID_ANY, _('Primer Valor:'))
        self.TxtValor1 = wx.TextCtrl(self, wx.ID_ANY, '')
        self.label_9 = wx.StaticText(self, wx.ID_ANY, _('Segundo Valor:'))
        self.TxtValor2 = wx.TextCtrl(self, wx.ID_ANY, '')
        self.label_10 = wx.StaticText(self, wx.ID_ANY, _('Resultado:'))
        self.lblResultado = wx.StaticText(self, wx.ID_ANY, '')
        self.BtnCalcular = wx.Button(self, wx.ID_ANY, _('Sumar'))
        self.BtnCerrar = wx.Button(self, wx.ID_ANY, _('Cerrar'))
        self.__set_properties()
        self.__do_layout()
        self.Bind(wx.EVT_BUTTON, self.OnSumar, self.BtnCalcular)
        self.Bind(wx.EVT_BUTTON, self.OnCerrar, self.BtnCerrar)

    def __set_properties(self):
        self.SetTitle(_('Suma Dos Numeros'))
        self.SetSize((648, 390))
        self.label_7.SetFont(wx.Font(16, wx.MODERN, wx.NORMAL, wx.BOLD, 0, ''))
        self.lblResultado.SetForegroundColour(wx.SystemSettings_GetColour(
            wx.SYS_COLOUR_3DDKSHADOW))
        self.lblResultado.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD,
            0, 'Sans'))
        self.BtnCalcular.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD,
            0, 'Sans'))
        self.BtnCalcular.SetToolTipString(_('Calcular la Suma...'))
        self.BtnCerrar.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD, 0,
            ''))
        self.BtnCerrar.SetToolTipString(_('Cerrar la Aplicacion'))

    def __do_layout(self):
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.VERTICAL)
        grid_sizer_2 = wx.FlexGridSizer(1, 2, 0, 0)
        grid_sizer_1 = wx.FlexGridSizer(3, 2, 0, 0)
        sizer_2.Add(self.label_7, 0, wx.TOP | wx.BOTTOM | wx.
            ALIGN_CENTER_HORIZONTAL, 20)
        grid_sizer_1.Add(self.label_8, 0, 0, 0)
        grid_sizer_1.Add(self.TxtValor1, 0, wx.EXPAND | wx.
            ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.label_9, 0, 0, 0)
        grid_sizer_1.Add(self.TxtValor2, 0, wx.EXPAND | wx.
            ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.label_10, 0, 0, 0)
        grid_sizer_1.Add(self.lblResultado, 0, wx.ALIGN_RIGHT, 0)
        sizer_2.Add(grid_sizer_1, 1, wx.EXPAND, 0)
        grid_sizer_2.Add(self.BtnCalcular, 0, 0, 0)
        grid_sizer_2.Add(self.BtnCerrar, 0, 0, 0)
        sizer_2.Add(grid_sizer_2, 1, wx.EXPAND, 0)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        self.Layout()
        self.Centre()

    def OnSumar(self, event):
        try:
            if self.TxtValor1.GetValue() == '' or self.TxtValor2.GetValue(
                ) == '':
                MensajeVacio = wx.MessageDialog(self, 'Casillas Vacias!',
                    'Error', Wx.OK)
                MensajeVacio.ShowModal()
                MensajeVacio.Destroy()
                self.TxtValor1.Clear()
                self.TxtValor2.Clear()
                self.TxtValor1.SetFocus()
            else:
                if self.TxtValor1.GetValue() == ' ':
                    self.TxtValor1.GetValue() == 0
                if self.TxtValor2.GetValue() == ' ':
                    self.TxtValor2.GetValue() == 0
                suma = float(self.TxtValor1.GetValue()) + float(self.
                    TxtValor2.GetValue())
                self.lblResultado.SetLabel(str(suma))
        except:
            mensajeError = wx.MessageDialog(self, 'Ocurrio un Error!',
                'Error', wx.OK)
            mensajeError.ShowModal()
            mensajeError.Destroy()
            self.TxtValor1.Clear()
            self.TxtValor2.Clear()
            self.TxtValor1.SetFocus()
    <mask token>


<mask token>

<mask token>


class Suma(wx.Frame):

    def __init__(self, *args, **kwds):
        kwds['style'] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.label_7 = wx.StaticText(self, wx.ID_ANY, _('Suma de Dos Numeros'))
        self.label_8 = wx.StaticText(self, wx.ID_ANY, _('Primer Valor:'))
        self.TxtValor1 = wx.TextCtrl(self, wx.ID_ANY, '')
        self.label_9 = wx.StaticText(self, wx.ID_ANY, _('Segundo Valor:'))
        self.TxtValor2 = wx.TextCtrl(self, wx.ID_ANY, '')
        self.label_10 = wx.StaticText(self, wx.ID_ANY, _('Resultado:'))
        self.lblResultado = wx.StaticText(self, wx.ID_ANY, '')
        self.BtnCalcular = wx.Button(self, wx.ID_ANY, _('Sumar'))
        self.BtnCerrar = wx.Button(self, wx.ID_ANY, _('Cerrar'))
        self.__set_properties()
        self.__do_layout()
        self.Bind(wx.EVT_BUTTON, self.OnSumar, self.BtnCalcular)
        self.Bind(wx.EVT_BUTTON, self.OnCerrar, self.BtnCerrar)

    def __set_properties(self):
        self.SetTitle(_('Suma Dos Numeros'))
        self.SetSize((648, 390))
        self.label_7.SetFont(wx.Font(16, wx.MODERN, wx.NORMAL, wx.BOLD, 0, ''))
        self.lblResultado.SetForegroundColour(wx.SystemSettings_GetColour(
            wx.SYS_COLOUR_3DDKSHADOW))
        self.lblResultado.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD,
            0, 'Sans'))
        self.BtnCalcular.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD,
            0, 'Sans'))
        self.BtnCalcular.SetToolTipString(_('Calcular la Suma...'))
        self.BtnCerrar.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD, 0,
            ''))
        self.BtnCerrar.SetToolTipString(_('Cerrar la Aplicacion'))

    def __do_layout(self):
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.VERTICAL)
        grid_sizer_2 = wx.FlexGridSizer(1, 2, 0, 0)
        grid_sizer_1 = wx.FlexGridSizer(3, 2, 0, 0)
        sizer_2.Add(self.label_7, 0, wx.TOP | wx.BOTTOM | wx.
            ALIGN_CENTER_HORIZONTAL, 20)
        grid_sizer_1.Add(self.label_8, 0, 0, 0)
        grid_sizer_1.Add(self.TxtValor1, 0, wx.EXPAND | wx.
            ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.label_9, 0, 0, 0)
        grid_sizer_1.Add(self.TxtValor2, 0, wx.EXPAND | wx.
            ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.label_10, 0, 0, 0)
        grid_sizer_1.Add(self.lblResultado, 0, wx.ALIGN_RIGHT, 0)
        sizer_2.Add(grid_sizer_1, 1, wx.EXPAND, 0)
        grid_sizer_2.Add(self.BtnCalcular, 0, 0, 0)
        grid_sizer_2.Add(self.BtnCerrar, 0, 0, 0)
        sizer_2.Add(grid_sizer_2, 1, wx.EXPAND, 0)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        self.Layout()
        self.Centre()

    def OnSumar(self, event):
        try:
            if self.TxtValor1.GetValue() == '' or self.TxtValor2.GetValue(
                ) == '':
                MensajeVacio = wx.MessageDialog(self, 'Casillas Vacias!',
                    'Error', Wx.OK)
                MensajeVacio.ShowModal()
                MensajeVacio.Destroy()
                self.TxtValor1.Clear()
                self.TxtValor2.Clear()
                self.TxtValor1.SetFocus()
            else:
                if self.TxtValor1.GetValue() == ' ':
                    self.TxtValor1.GetValue() == 0
                if self.TxtValor2.GetValue() == ' ':
                    self.TxtValor2.GetValue() == 0
                suma = float(self.TxtValor1.GetValue()) + float(self.
                    TxtValor2.GetValue())
                self.lblResultado.SetLabel(str(suma))
        except:
            mensajeError = wx.MessageDialog(self, 'Ocurrio un Error!',
                'Error', wx.OK)
            mensajeError.ShowModal()
            mensajeError.Destroy()
            self.TxtValor1.Clear()
            self.TxtValor2.Clear()
            self.TxtValor1.SetFocus()

    def OnCerrar(self, event):
        mensaje = wx.MessageDialog(self, 'Gracias por usar la Aplicacion',
            'Aviso', wx.OK)
        mensaje.ShowModal()
        mensaje.Destroy()
        self.Close()


<mask token>

<mask token>


class Suma(wx.Frame):

    def __init__(self, *args, **kwds):
        kwds['style'] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.label_7 = wx.StaticText(self, wx.ID_ANY, _('Suma de Dos Numeros'))
        self.label_8 = wx.StaticText(self, wx.ID_ANY, _('Primer Valor:'))
        self.TxtValor1 = wx.TextCtrl(self, wx.ID_ANY, '')
        self.label_9 = wx.StaticText(self, wx.ID_ANY, _('Segundo Valor:'))
        self.TxtValor2 = wx.TextCtrl(self, wx.ID_ANY, '')
        self.label_10 = wx.StaticText(self, wx.ID_ANY, _('Resultado:'))
        self.lblResultado = wx.StaticText(self, wx.ID_ANY, '')
        self.BtnCalcular = wx.Button(self, wx.ID_ANY, _('Sumar'))
        self.BtnCerrar = wx.Button(self, wx.ID_ANY, _('Cerrar'))
        self.__set_properties()
        self.__do_layout()
        self.Bind(wx.EVT_BUTTON, self.OnSumar, self.BtnCalcular)
        self.Bind(wx.EVT_BUTTON, self.OnCerrar, self.BtnCerrar)

    def __set_properties(self):
        self.SetTitle(_('Suma Dos Numeros'))
        self.SetSize((648, 390))
        self.label_7.SetFont(wx.Font(16, wx.MODERN, wx.NORMAL, wx.BOLD, 0, ''))
        self.lblResultado.SetForegroundColour(wx.SystemSettings_GetColour(
            wx.SYS_COLOUR_3DDKSHADOW))
        self.lblResultado.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD,
            0, 'Sans'))
        self.BtnCalcular.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD,
            0, 'Sans'))
        self.BtnCalcular.SetToolTipString(_('Calcular la Suma...'))
        self.BtnCerrar.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD, 0,
            ''))
        self.BtnCerrar.SetToolTipString(_('Cerrar la Aplicacion'))

    def __do_layout(self):
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.VERTICAL)
        grid_sizer_2 = wx.FlexGridSizer(1, 2, 0, 0)
        grid_sizer_1 = wx.FlexGridSizer(3, 2, 0, 0)
        sizer_2.Add(self.label_7, 0, wx.TOP | wx.BOTTOM | wx.
            ALIGN_CENTER_HORIZONTAL, 20)
        grid_sizer_1.Add(self.label_8, 0, 0, 0)
        grid_sizer_1.Add(self.TxtValor1, 0, wx.EXPAND | wx.
            ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.label_9, 0, 0, 0)
        grid_sizer_1.Add(self.TxtValor2, 0, wx.EXPAND | wx.
            ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.label_10, 0, 0, 0)
        grid_sizer_1.Add(self.lblResultado, 0, wx.ALIGN_RIGHT, 0)
        sizer_2.Add(grid_sizer_1, 1, wx.EXPAND, 0)
        grid_sizer_2.Add(self.BtnCalcular, 0, 0, 0)
        grid_sizer_2.Add(self.BtnCerrar, 0, 0, 0)
        sizer_2.Add(grid_sizer_2, 1, wx.EXPAND, 0)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        self.Layout()
        self.Centre()

    def OnSumar(self, event):
        try:
            if self.TxtValor1.GetValue() == '' or self.TxtValor2.GetValue(
                ) == '':
                MensajeVacio = wx.MessageDialog(self, 'Casillas Vacias!',
                    'Error', Wx.OK)
                MensajeVacio.ShowModal()
                MensajeVacio.Destroy()
                self.TxtValor1.Clear()
                self.TxtValor2.Clear()
                self.TxtValor1.SetFocus()
            else:
                if self.TxtValor1.GetValue() == ' ':
                    self.TxtValor1.GetValue() == 0
                if self.TxtValor2.GetValue() == ' ':
                    self.TxtValor2.GetValue() == 0
                suma = float(self.TxtValor1.GetValue()) + float(self.
                    TxtValor2.GetValue())
                self.lblResultado.SetLabel(str(suma))
        except:
            mensajeError = wx.MessageDialog(self, 'Ocurrio un Error!',
                'Error', wx.OK)
            mensajeError.ShowModal()
            mensajeError.Destroy()
            self.TxtValor1.Clear()
            self.TxtValor2.Clear()
            self.TxtValor1.SetFocus()

    def OnCerrar(self, event):
        mensaje = wx.MessageDialog(self, 'Gracias por usar la Aplicacion',
            'Aviso', wx.OK)
        mensaje.ShowModal()
        mensaje.Destroy()
        self.Close()


if __name__ == '__main__':
    gettext.install('app')
    app = wx.PySimpleApp(0)
    wx.InitAllImageHandlers()
    vtnPrincipal = Suma(None, wx.ID_ANY, '')
    app.SetTopWindow(vtnPrincipal)
    vtnPrincipal.Show()
    app.MainLoop()

#!/usr/bin/env python
# -*- coding: ANSI_X3.4-1968 -*-
#
# generated by wxGlade 0.6.8 on Wed Aug 19 20:32:17 2015
#

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class Suma(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: Suma.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.label_7 = wx.StaticText(self, wx.ID_ANY, _("Suma de Dos Numeros"))
        self.label_8 = wx.StaticText(self, wx.ID_ANY, _("Primer Valor:"))
        self.TxtValor1 = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_9 = wx.StaticText(self, wx.ID_ANY, _("Segundo Valor:"))
        self.TxtValor2 = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_10 = wx.StaticText(self, wx.ID_ANY, _("Resultado:"))
        self.lblResultado = wx.StaticText(self, wx.ID_ANY, "")
        self.BtnCalcular = wx.Button(self, wx.ID_ANY, _("Sumar"))
        self.BtnCerrar = wx.Button(self, wx.ID_ANY, _("Cerrar"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.OnSumar, self.BtnCalcular)
        self.Bind(wx.EVT_BUTTON, self.OnCerrar, self.BtnCerrar)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: Suma.__set_properties
        self.SetTitle(_("Suma Dos Numeros"))
        self.SetSize((648, 390))
        self.label_7.SetFont(wx.Font(16, wx.MODERN, wx.NORMAL, wx.BOLD, 0, ""))
        self.lblResultado.SetForegroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DDKSHADOW))
        self.lblResultado.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD, 0, "Sans"))
        self.BtnCalcular.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD, 0, "Sans"))
        self.BtnCalcular.SetToolTipString(_("Calcular la Suma..."))
        self.BtnCerrar.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.BOLD, 0, ""))
        self.BtnCerrar.SetToolTipString(_("Cerrar la Aplicacion"))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: Suma.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.VERTICAL)
        grid_sizer_2 = wx.FlexGridSizer(1, 2, 0, 0)
        grid_sizer_1 = wx.FlexGridSizer(3, 2, 0, 0)
        sizer_2.Add(self.label_7, 0, wx.TOP | wx.BOTTOM | wx.ALIGN_CENTER_HORIZONTAL, 20)
        grid_sizer_1.Add(self.label_8, 0, 0, 0)
        grid_sizer_1.Add(self.TxtValor1, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.label_9, 0, 0, 0)
        grid_sizer_1.Add(self.TxtValor2, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.label_10, 0, 0, 0)
        grid_sizer_1.Add(self.lblResultado, 0, wx.ALIGN_RIGHT, 0)
        sizer_2.Add(grid_sizer_1, 1, wx.EXPAND, 0)
        grid_sizer_2.Add(self.BtnCalcular, 0, 0, 0)
        grid_sizer_2.Add(self.BtnCerrar, 0, 0, 0)
        sizer_2.Add(grid_sizer_2, 1, wx.EXPAND, 0)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        self.Layout()
        self.Centre()
        # end wxGlade

    def OnSumar(self, event):  # wxGlade: Suma.<event_handler>
        try:
            if (self.TxtValor1.GetValue()=="" or self.TxtValor2.GetValue()==""):
                MensajeVacio=wx.MessageDialog(self,'Casillas Vacias!','Error',Wx.OK)
                MensajeVacio.ShowModal()
                MensajeVacio.Destroy()
                self.TxtValor1.Clear()
                self.TxtValor2.Clear()
                self.TxtValor1.SetFocus()
            else:
                if self.TxtValor1.GetValue()==" ":
                    self.TxtValor1.GetValue()==0
                if self.TxtValor2.GetValue()==" ":
                    self.TxtValor2.GetValue()==0
                suma=float(self.TxtValor1.GetValue())+float(self.TxtValor2.GetValue())
                self.lblResultado.SetLabel(str(suma))
        except:
            mensajeError=wx.MessageDialog(self,'Ocurrio un Error!', 'Error', wx.OK)
            mensajeError.ShowModal()
            mensajeError.Destroy()
            self.TxtValor1.Clear()
            self.TxtValor2.Clear()
            self.TxtValor1.SetFocus()

    def OnCerrar(self, event):  # wxGlade: Suma.<event_handler>
        mensaje=wx.MessageDialog(self,'Gracias por usar la Aplicacion', 'Aviso', wx.OK)
        mensaje.ShowModal()
        mensaje.Destroy()
        self.Close()

# end of class Suma
if __name__ == "__main__":
    gettext.install("app") # replace with the appropriate catalog name

    app = wx.PySimpleApp(0)
    wx.InitAllImageHandlers()
    vtnPrincipal = Suma(None, wx.ID_ANY, "")
    app.SetTopWindow(vtnPrincipal)
    vtnPrincipal.Show()
    app.MainLoop()
