#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.9.3 on Sat Jul 13 17:14:58 2019 from "C:\Users\Trainer\PycharmProjects\GUI_Examples\DD\Simple_TO-DO_List.wxg"
#

import wx


# begin wxGlade: dependencies
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class FirstFrame(wx.Frame) :
    def __init__(self, *args, **kwds) :
        # begin wxGlade: FirstFrame.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((400, 300))
        # print ('Add Button Pressed, Code to be inserted Before')
        self.AddBtn = wx.Button(self, wx.ID_ANY, "Add")
        self.inp_msg = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER)
        self.Quit = wx.Button(self, wx.ID_ANY, "Quit")
        self.label_1 = wx.StaticText(self, wx.ID_ANY, "")  # Kiril Ilarionov
        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.on_ADD_button_pressed, self.AddBtn)
        self.Bind(wx.EVT_BUTTON, self.on_Quit_button_pressed, self.Quit)
        # end wxGlade

    def __set_properties(self) :
        # begin wxGlade: FirstFrame.__set_properties
        self.SetTitle("Simple TO-DO List")
        self.SetBackgroundColour(wx.Colour(255, 255, 255))
        self.AddBtn.SetBackgroundColour(wx.Colour(255, 0, 0))
        self.AddBtn.SetForegroundColour(wx.Colour(47, 47, 79))
        self.AddBtn.SetDefault()
        self.inp_msg.SetFocus()
        self.Quit.SetBackgroundColour(wx.Colour(255, 255, 0))
        self.Quit.SetForegroundColour(wx.Colour(35, 35, 142))
        # end wxGlade

    def __do_layout(self) :
        # begin wxGlade: FirstFrame.__do_layout
        sizer_1 = wx.WrapSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_2.Add(self.AddBtn, 0, wx.ALL, 8)
        sizer_2.Add(self.inp_msg, 0, wx.ALL, 10)
        sizer_2.Add(self.Quit, 0, wx.ALL, 8)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)

        sizer_1.Add(self.label_1, 8, wx.ALL, 8)  # Kiril Ilarionov
        self.SetSizer(sizer_1)
        self.Layout()
        self.Centre()
        # end wxGlade

    def on_ADD_button_pressed(self, event) :  # wxGlade: FirstFrame.<event_handler>
        # print("Event handler 'on_ADD_button_pressed' not implemented!")
        disp = self.label_1.GetLabelText() + '\n' + self.inp_msg.GetValue()  # Kiril Ilarionov
        self.label_1.SetLabelText(disp)  # Kiril Ilarionov
        self.inp_msg.SetValue('')  # Kiril Ilarionov
        event.Skip()

    def on_Quit_button_pressed(self, event) :  # wxGlade: FirstFrame.<event_handler>
        print("Event handler 'on_Quit_button_pressed' not implemented!")
        exit()
        event.Skip()


# end of class FirstFrame

class SimpleToDoList(wx.App) :
    def OnInit(self) :
        self.frame = FirstFrame(None, wx.ID_ANY, "")
        self.SetTopWindow(self.frame)
        self.frame.Show()
        return True


# end of class SimpleToDoList

if __name__ == "__main__" :
    simple_to_do_list_app = SimpleToDoList(0)
    simple_to_do_list_app.MainLoop()

# My source is commented with # Kiril Ilarionov

e89c79a76cf054afeb479a32b5c879e66781c0b9
<mask token>


class FirstFrame(wx.Frame):

    def __init__(self, *args, **kwds):
        kwds['style'] = kwds.get('style', 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((400, 300))
        self.AddBtn = wx.Button(self, wx.ID_ANY, 'Add')
        self.inp_msg = wx.TextCtrl(self, wx.ID_ANY, '', style=wx.
            TE_PROCESS_ENTER)
        self.Quit = wx.Button(self, wx.ID_ANY, 'Quit')
        self.label_1 = wx.StaticText(self, wx.ID_ANY, '')
        self.__set_properties()
        self.__do_layout()
        self.Bind(wx.EVT_BUTTON, self.on_ADD_button_pressed, self.AddBtn)
        self.Bind(wx.EVT_BUTTON, self.on_Quit_button_pressed, self.Quit)

    def __set_properties(self):
        self.SetTitle('Simple TO-DO List')
        self.SetBackgroundColour(wx.Colour(255, 255, 255))
        self.AddBtn.SetBackgroundColour(wx.Colour(255, 0, 0))
        self.AddBtn.SetForegroundColour(wx.Colour(47, 47, 79))
        self.AddBtn.SetDefault()
        self.inp_msg.SetFocus()
        self.Quit.SetBackgroundColour(wx.Colour(255, 255, 0))
        self.Quit.SetForegroundColour(wx.Colour(35, 35, 142))
    <mask token>
    <mask token>
    <mask token>


class SimpleToDoList(wx.App):

    def OnInit(self):
        self.frame = FirstFrame(None, wx.ID_ANY, '')
        self.SetTopWindow(self.frame)
        self.frame.Show()
        return True


<mask token>

<mask token>


class FirstFrame(wx.Frame):

    def __init__(self, *args, **kwds):
        kwds['style'] = kwds.get('style', 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((400, 300))
        self.AddBtn = wx.Button(self, wx.ID_ANY, 'Add')
        self.inp_msg = wx.TextCtrl(self, wx.ID_ANY, '', style=wx.
            TE_PROCESS_ENTER)
        self.Quit = wx.Button(self, wx.ID_ANY, 'Quit')
        self.label_1 = wx.StaticText(self, wx.ID_ANY, '')
        self.__set_properties()
        self.__do_layout()
        self.Bind(wx.EVT_BUTTON, self.on_ADD_button_pressed, self.AddBtn)
        self.Bind(wx.EVT_BUTTON, self.on_Quit_button_pressed, self.Quit)

    def __set_properties(self):
        self.SetTitle('Simple TO-DO List')
        self.SetBackgroundColour(wx.Colour(255, 255, 255))
        self.AddBtn.SetBackgroundColour(wx.Colour(255, 0, 0))
        self.AddBtn.SetForegroundColour(wx.Colour(47, 47, 79))
        self.AddBtn.SetDefault()
        self.inp_msg.SetFocus()
        self.Quit.SetBackgroundColour(wx.Colour(255, 255, 0))
        self.Quit.SetForegroundColour(wx.Colour(35, 35, 142))
    <mask token>
    <mask token>

    def on_Quit_button_pressed(self, event):
        print("Event handler 'on_Quit_button_pressed' not implemented!")
        exit()
        event.Skip()


class SimpleToDoList(wx.App):

    def OnInit(self):
        self.frame = FirstFrame(None, wx.ID_ANY, '')
        self.SetTopWindow(self.frame)
        self.frame.Show()
        return True


<mask token>

<mask token>


class FirstFrame(wx.Frame):

    def __init__(self, *args, **kwds):
        kwds['style'] = kwds.get('style', 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((400, 300))
        self.AddBtn = wx.Button(self, wx.ID_ANY, 'Add')
        self.inp_msg = wx.TextCtrl(self, wx.ID_ANY, '', style=wx.
            TE_PROCESS_ENTER)
        self.Quit = wx.Button(self, wx.ID_ANY, 'Quit')
        self.label_1 = wx.StaticText(self, wx.ID_ANY, '')
        self.__set_properties()
        self.__do_layout()
        self.Bind(wx.EVT_BUTTON, self.on_ADD_button_pressed, self.AddBtn)
        self.Bind(wx.EVT_BUTTON, self.on_Quit_button_pressed, self.Quit)

    def __set_properties(self):
        self.SetTitle('Simple TO-DO List')
        self.SetBackgroundColour(wx.Colour(255, 255, 255))
        self.AddBtn.SetBackgroundColour(wx.Colour(255, 0, 0))
        self.AddBtn.SetForegroundColour(wx.Colour(47, 47, 79))
        self.AddBtn.SetDefault()
        self.inp_msg.SetFocus()
        self.Quit.SetBackgroundColour(wx.Colour(255, 255, 0))
        self.Quit.SetForegroundColour(wx.Colour(35, 35, 142))

    def __do_layout(self):
        sizer_1 = wx.WrapSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_2.Add(self.AddBtn, 0, wx.ALL, 8)
        sizer_2.Add(self.inp_msg, 0, wx.ALL, 10)
        sizer_2.Add(self.Quit, 0, wx.ALL, 8)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
        sizer_1.Add(self.label_1, 8, wx.ALL, 8)
        self.SetSizer(sizer_1)
        self.Layout()
        self.Centre()

    def on_ADD_button_pressed(self, event):
        disp = self.label_1.GetLabelText() + '\n' + self.inp_msg.GetValue()
        self.label_1.SetLabelText(disp)
        self.inp_msg.SetValue('')
        event.Skip()

    def on_Quit_button_pressed(self, event):
        print("Event handler 'on_Quit_button_pressed' not implemented!")
        exit()
        event.Skip()


class SimpleToDoList(wx.App):

    def OnInit(self):
        self.frame = FirstFrame(None, wx.ID_ANY, '')
        self.SetTopWindow(self.frame)
        self.frame.Show()
        return True


<mask token>

<mask token>


class FirstFrame(wx.Frame):

    def __init__(self, *args, **kwds):
        kwds['style'] = kwds.get('style', 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((400, 300))
        self.AddBtn = wx.Button(self, wx.ID_ANY, 'Add')
        self.inp_msg = wx.TextCtrl(self, wx.ID_ANY, '', style=wx.
            TE_PROCESS_ENTER)
        self.Quit = wx.Button(self, wx.ID_ANY, 'Quit')
        self.label_1 = wx.StaticText(self, wx.ID_ANY, '')
        self.__set_properties()
        self.__do_layout()
        self.Bind(wx.EVT_BUTTON, self.on_ADD_button_pressed, self.AddBtn)
        self.Bind(wx.EVT_BUTTON, self.on_Quit_button_pressed, self.Quit)

    def __set_properties(self):
        self.SetTitle('Simple TO-DO List')
        self.SetBackgroundColour(wx.Colour(255, 255, 255))
        self.AddBtn.SetBackgroundColour(wx.Colour(255, 0, 0))
        self.AddBtn.SetForegroundColour(wx.Colour(47, 47, 79))
        self.AddBtn.SetDefault()
        self.inp_msg.SetFocus()
        self.Quit.SetBackgroundColour(wx.Colour(255, 255, 0))
        self.Quit.SetForegroundColour(wx.Colour(35, 35, 142))

    def __do_layout(self):
        sizer_1 = wx.WrapSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_2.Add(self.AddBtn, 0, wx.ALL, 8)
        sizer_2.Add(self.inp_msg, 0, wx.ALL, 10)
        sizer_2.Add(self.Quit, 0, wx.ALL, 8)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
        sizer_1.Add(self.label_1, 8, wx.ALL, 8)
        self.SetSizer(sizer_1)
        self.Layout()
        self.Centre()

    def on_ADD_button_pressed(self, event):
        disp = self.label_1.GetLabelText() + '\n' + self.inp_msg.GetValue()
        self.label_1.SetLabelText(disp)
        self.inp_msg.SetValue('')
        event.Skip()

    def on_Quit_button_pressed(self, event):
        print("Event handler 'on_Quit_button_pressed' not implemented!")
        exit()
        event.Skip()


class SimpleToDoList(wx.App):

    def OnInit(self):
        self.frame = FirstFrame(None, wx.ID_ANY, '')
        self.SetTopWindow(self.frame)
        self.frame.Show()
        return True


if __name__ == '__main__':
    simple_to_do_list_app = SimpleToDoList(0)
    simple_to_do_list_app.MainLoop()

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.9.3 on Sat Jul 13 17:14:58 2019 from "C:\Users\Trainer\PycharmProjects\GUI_Examples\DD\Simple_TO-DO_List.wxg"
#

import wx


# begin wxGlade: dependencies
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class FirstFrame(wx.Frame) :
    def __init__(self, *args, **kwds) :
        # begin wxGlade: FirstFrame.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((400, 300))
        # print ('Add Button Pressed, Code to be inserted Before')
        self.AddBtn = wx.Button(self, wx.ID_ANY, "Add")
        self.inp_msg = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER)
        self.Quit = wx.Button(self, wx.ID_ANY, "Quit")
        self.label_1 = wx.StaticText(self, wx.ID_ANY, "")  # Kiril Ilarionov
        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.on_ADD_button_pressed, self.AddBtn)
        self.Bind(wx.EVT_BUTTON, self.on_Quit_button_pressed, self.Quit)
        # end wxGlade

    def __set_properties(self) :
        # begin wxGlade: FirstFrame.__set_properties
        self.SetTitle("Simple TO-DO List")
        self.SetBackgroundColour(wx.Colour(255, 255, 255))
        self.AddBtn.SetBackgroundColour(wx.Colour(255, 0, 0))
        self.AddBtn.SetForegroundColour(wx.Colour(47, 47, 79))
        self.AddBtn.SetDefault()
        self.inp_msg.SetFocus()
        self.Quit.SetBackgroundColour(wx.Colour(255, 255, 0))
        self.Quit.SetForegroundColour(wx.Colour(35, 35, 142))
        # end wxGlade

    def __do_layout(self) :
        # begin wxGlade: FirstFrame.__do_layout
        sizer_1 = wx.WrapSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_2.Add(self.AddBtn, 0, wx.ALL, 8)
        sizer_2.Add(self.inp_msg, 0, wx.ALL, 10)
        sizer_2.Add(self.Quit, 0, wx.ALL, 8)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)

        sizer_1.Add(self.label_1, 8, wx.ALL, 8)  # Kiril Ilarionov
        self.SetSizer(sizer_1)
        self.Layout()
        self.Centre()
        # end wxGlade

    def on_ADD_button_pressed(self, event) :  # wxGlade: FirstFrame.<event_handler>
        # print("Event handler 'on_ADD_button_pressed' not implemented!")
        disp = self.label_1.GetLabelText() + '\n' + self.inp_msg.GetValue()  # Kiril Ilarionov
        self.label_1.SetLabelText(disp)  # Kiril Ilarionov
        self.inp_msg.SetValue('')  # Kiril Ilarionov
        event.Skip()

    def on_Quit_button_pressed(self, event) :  # wxGlade: FirstFrame.<event_handler>
        print("Event handler 'on_Quit_button_pressed' not implemented!")
        exit()
        event.Skip()


# end of class FirstFrame

class SimpleToDoList(wx.App) :
    def OnInit(self) :
        self.frame = FirstFrame(None, wx.ID_ANY, "")
        self.SetTopWindow(self.frame)
        self.frame.Show()
        return True


# end of class SimpleToDoList

if __name__ == "__main__" :
    simple_to_do_list_app = SimpleToDoList(0)
    simple_to_do_list_app.MainLoop()

# My source is commented with # Kiril Ilarionov
