def __init__(self, *args, **kwds):
        kwds["style"] = wx.TAB_TRAVERSAL
        wx.Panel.__init__(self, *args, **kwds)

        self.panel_details = wx.Panel(self, -1)
        self.panel_buttons = panel_buttons(self, -1)

        self.label_details = wx.StaticText(self, -1, "DETAILS")
        self.details_list = vListCtrl(self.panel_details, style=wx.LC_HRULES | wx.LC_SINGLE_SEL)

        self.panel_details_botttom = wx.Panel(self.panel_details, -1)

        self.txt_ctrl_details_records = wx.TextCtrl(self.panel_details_botttom, -1, "")
        self.txt_ctrl_details_total = wx.TextCtrl(self.panel_details_botttom, -1, "")

        self.panel_buttons.new.Bind(wx.EVT_BUTTON, self.OnNew, self.panel_buttons.new)
        self.panel_buttons.edit.Bind(wx.EVT_BUTTON, self.OnEdit, self.panel_buttons.edit)
        self.panel_buttons.cancel.Bind(wx.EVT_BUTTON, self.OnCancel, self.panel_buttons.cancel)
        self.Bind(wx.EVT_BUTTON, self.OnDelete, self.panel_buttons.delete)
        self.Bind(wx.EVT_BUTTON, self.OnSave, self.panel_buttons.save)
        self.Bind(wx.EVT_BUTTON, self.OnRefresh, self.panel_buttons.refresh)

        tc = (self.txt_ctrl_details_records, self.txt_ctrl_details_total)

        for t in tc:
            t.SetEditable(False)
        self.__layout()
예제 #2
0
    def __init__(self, *args, **kwds):
        kwds["style"] = wx.TAB_TRAVERSAL
        wx.Panel.__init__(self, *args, **kwds)
        
        self.label_payments = wx.StaticText(self, -1, "PAYMENTS")
        self.panel_payments = wx.Panel(self, -1)
        self.label_details  = wx.StaticText(self, -1, "DETAILS")
        self.panel_payment_details  = wx.Panel(self, -1)
        self.panel_buttons  = panel_buttons(self, -1)
        
        self.payments_list          = vListCtrl(self.panel_payments,  style = wx.LC_HRULES | wx.LC_SINGLE_SEL)
        self.panel_payments_botttom = wx.Panel( self.panel_payments, -1)
       
        self.txt_ctrl_pay_records  = wx.TextCtrl(self.panel_payments_botttom, -1, " ")
        self.txt_ctrl_pay_total    = wx.TextCtrl(self.panel_payments_botttom, -1, "", style=wx.TE_RIGHT)
        
        self.details_list          = vListCtrl(self.panel_payment_details,  style = wx.LC_HRULES | wx.LC_SINGLE_SEL)
        self.panel_details_botttom = wx.Panel( self.panel_payment_details, -1)
        
        self.txt_ctrl_details_records = wx.TextCtrl(self.panel_details_botttom, -1, "")
        self.txt_ctrl_details_total   = wx.TextCtrl(self.panel_details_botttom, -1, "", style=wx.TE_RIGHT)
       
        self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnPaymentItemSelected, self.payments_list)
        self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnDetailItemSelected,  self.details_list)
 
        self.panel_buttons.new.Bind(wx.EVT_BUTTON,    self.OnNew,    self.panel_buttons.new )
        self.panel_buttons.edit.Bind(wx.EVT_BUTTON,   self.OnEdit,   self.panel_buttons.edit )
        self.panel_buttons.cancel.Bind(wx.EVT_BUTTON, self.OnCancel, self.panel_buttons.cancel )
        
        self.Bind(wx.EVT_BUTTON, self.OnDelete,  self.panel_buttons.delete)
        self.Bind(wx.EVT_BUTTON, self.OnSave,    self.panel_buttons.save)
        self.Bind(wx.EVT_BUTTON, self.OnRefresh, self.panel_buttons.refresh )
        
        tc = [self.txt_ctrl_pay_records,
              self.txt_ctrl_pay_total,
              self.txt_ctrl_details_records,
              self.txt_ctrl_details_total ]
        
        for t in tc: t.SetEditable(False)
        self.__layout()
 
        pub.subscribe(self.displayData, 'student_payments.studentselected')

        self.pay_records = 0
        self.detail_records = 0
        
        self.__properties()
        self.__layout()
예제 #3
0
 def __init__(self, *args, **kwds):
     kwds["style"] = wx.TAB_TRAVERSAL
     wx.Panel.__init__(self, *args, **kwds)
     
     self.label_payments = wx.StaticText(self, -1, "PAYMENTS")
     self.panel_payments = wx.Panel(self, -1)
     self.label_details  = wx.StaticText(self, -1, "DETAILS")
     self.panel_details  = wx.Panel(self, -1)
     self.panel_buttons  = panel_buttons(self, -1)
     
     self.payments_list          = vListCtrl(self.panel_payments,  style = wx.LC_HRULES | wx.LC_SINGLE_SEL)
     self.panel_payments_botttom = wx.Panel( self.panel_payments, -1)
    
     self.txt_ctrl_pay_records  = wx.TextCtrl(self.panel_payments_botttom, -1, " ")
     self.txt_ctrl_pay_total    = wx.TextCtrl(self.panel_payments_botttom, -1, " ")
     
     self.panel_details_botttom = wx.Panel( self.panel_details, -1)
     self.label_recipt          = wx.StaticText(self.panel_details_botttom, -1, "Recipt No.")
     self.txt_ctrl_details_records = wx.TextCtrl(self.panel_details_botttom, -1, "")
     self.txt_ctrl_details_total   = wx.TextCtrl(self.panel_details_botttom, -1, "")
     
     self.panel_buttons.new.Bind(wx.EVT_BUTTON, self.OnNew,       self.panel_buttons.new )
     self.panel_buttons.edit.Bind(wx.EVT_BUTTON, self.OnEdit,     self.panel_buttons.edit )
     self.panel_buttons.cancel.Bind(wx.EVT_BUTTON, self.OnCancel, self.panel_buttons.cancel )
     
     self.Bind(wx.EVT_BUTTON, self.OnDelete,  self.panel_buttons.delete)
     self.Bind(wx.EVT_BUTTON, self.OnSave,    self.panel_buttons.save)
     self.Bind(wx.EVT_BUTTON, self.OnRefresh, self.panel_buttons.refresh )
     
    
     pub.subscribe(self.displayData, 'registrationpayments.studentselected')
     
     
     
     tc = (self.txt_ctrl_pay_records,
           self.txt_ctrl_pay_total,
           self.txt_ctrl_details_records,
           self.txt_ctrl_details_total)
     
     for t in tc: t.SetEditable(False)
     self.__layout()