Esempio n. 1
0
    def InitToolbar(self):
        toolbar = wx.ToolBar(self)#, style=wx.TB_NODIVIDER)

        tbBack = toolbar.AddLabelTool(
                wx.ID_ANY, 'Back', wx.Bitmap(Resource.GetFileName('arrow-left.png')))
        self.Bind(wx.EVT_TOOL, self.OnBack, tbBack)

        self.tcPurchaseBillId = wx.TextCtrl(toolbar,size=wx.Size(80,-1))
        self.tcPurchaseBillId.Bind(wx.EVT_KEY_UP, self.OnPurchaseBillId)

        toolbar.AddControl(self.tcPurchaseBillId)

        tbForward = toolbar.AddLabelTool(
                wx.ID_ANY, 'Forward', wx.Bitmap(Resource.GetFileName('arrow-right.png')))
        self.Bind(wx.EVT_TOOL, self.OnForward, tbForward)

        toolbar.AddSeparator()

        tbSave = toolbar.AddLabelTool(wx.ID_ANY, 'Save', wx.Bitmap(Resource.GetFileName('save.png')))
        self.Bind(wx.EVT_TOOL, self.OnSave, tbSave)
        tbAddRow = toolbar.AddLabelTool(wx.ID_ANY, 'Add Row', wx.Bitmap(Resource.GetFileName('add-row.png')))
        self.Bind(wx.EVT_TOOL, self.OnAddRow, tbAddRow)

        tbPrint = toolbar.AddLabelTool(
                wx.ID_ANY, 'Print', wx.Bitmap(Resource.GetFileName('print.png')))
        self.Bind(wx.EVT_TOOL, self.OnPrint, tbPrint)

        toolbar.Realize()

        self.toolbar = toolbar
Esempio n. 2
0
    def _InitToolBar(self):
        toolbar = wx.ToolBar(self, style=wx.TB_NODIVIDER)

        tbNewInvoice = toolbar.AddLabelTool(
            wx.ID_ANY, 'New Invoice',
            wx.Bitmap(Resource.GetFileName('invoice-new.png')))
        self.Bind(wx.EVT_TOOL, self.OnNewInvoice, tbNewInvoice)

        tbViewInvoice = toolbar.AddLabelTool(
            wx.ID_ANY, 'View Invoice',
            wx.Bitmap(Resource.GetFileName('invoice-view.png')))
        self.Bind(wx.EVT_TOOL, self.OnViewInvoice, tbViewInvoice)

        toolbar.AddSeparator()

        tbPurchase = toolbar.AddLabelTool(
            wx.ID_ANY, 'Purchase Bill',
            wx.Bitmap(Resource.GetFileName('purchase-bill.png')))
        self.Bind(wx.EVT_TOOL, self.OnPurchase, tbPurchase)

        toolbar.Realize()

        userbar = wx.ToolBar(self, style=wx.TB_NODIVIDER)

        tbLogOut = userbar.AddLabelTool(
            wx.ID_ANY, 'Quit', wx.Bitmap(Resource.GetFileName('exit.png')))
        self.Bind(wx.EVT_TOOL, self.OnLogOut, tbLogOut)

        userbar.Realize()

        self.stUserName = wx.StaticText(self, label="")

        maintoolbar = wx.BoxSizer(wx.HORIZONTAL)
        maintoolbar.Add(toolbar, 1, wx.ALIGN_LEFT, 5)
        maintoolbar.Add(self.stUserName, 0,
                        wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
        maintoolbar.Add(userbar, 0, wx.ALIGN_RIGHT, 5)

        return maintoolbar
Esempio n. 3
0
    def InitToolbar(self):
        toolbar = wx.ToolBar(self)#, style=wx.TB_NODIVIDER)

        tbBack = toolbar.AddLabelTool(
                wx.ID_ANY, 'Back', wx.Bitmap(Resource.GetFileName('arrow-left.png')))
        self.Bind(wx.EVT_TOOL, self.OnBack, tbBack)

        self.tcInvoiceId = wx.TextCtrl(toolbar,size=wx.Size(80,-1))
        self.tcInvoiceId.Bind(wx.EVT_KEY_UP, self.OnInvoiceId)

        toolbar.AddControl(self.tcInvoiceId)

        tbForward = toolbar.AddLabelTool(
                wx.ID_ANY, 'Forward', wx.Bitmap(Resource.GetFileName('arrow-right.png')))
        self.Bind(wx.EVT_TOOL, self.OnForward, tbForward)

        tbPrint = toolbar.AddLabelTool(
                wx.ID_ANY, 'Print', wx.Bitmap(Resource.GetFileName('print.png')))
        self.Bind(wx.EVT_TOOL, self.OnPrint, tbPrint)

        toolbar.Realize()

        self.toolbar = toolbar
Esempio n. 4
0
 def __init__(self, parent, title, logic):
     VWindow.__init__(self, parent, title, logic)
     self.icon = wx.Bitmap(Resource.GetFileName('purchase-bill-sml.png'))
Esempio n. 5
0
 def __init__(self, parent, title, logic):
     VWindow.__init__(self, parent, title, logic)
     self.icon = wx.Bitmap(Resource.GetFileName('invoice-new-sml.png'))
Esempio n. 6
0
 def _AddPage(self, pnl, title, iconfile):
     self.plMain.AddPage(pnl, title)
     pageid = self.plMain.GetPageIndex(pnl)
     self.plMain.SetPageBitmap(pageid,
                               wx.Bitmap(Resource.GetFileName(iconfile)))
     self.plMain.SetSelection(pageid)