Hello, I'm getting started with boa. I learn best from examples Does anyone have some real world examples that they could share ??
thanks for the help Bryan Webb
How about an About box?
#Boa:Dialog:About
from wxPython.wx import *
def create(parent): return About(parent)
[wxID_ABOUT, wxID_ABOUTBUTTON1, wxID_ABOUTSTATICBITMAP1, wxID_ABOUTSTATICTEXT1, wxID_ABOUTSTATICTEXT2] = map(lambda _init_ctrls: wxNewId(), range(5))
class About(wxDialog): def _init_utils(self): # generated method, don't edit pass
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id = wxID_ABOUT, name = 'About', parent = prnt, pos = wxPoint(425, 237), size = wxSize(640, 558), style = wxDEFAULT_DIALOG_STYLE, title = 'About DME') self._init_utils() self.SetClientSize(wxSize(632, 531))
self.staticText1 = wxStaticText(id = wxID_ABOUTSTATICTEXT1, label = 'The Coolest Application in the World!', name = 'staticText1', parent = self, pos = wxPoint(153, 8), size = wxSize(339, 22), style = wxALIGN_CENTRE) self.staticText1.SetFont(wxFont(14, wxSWISS, wxNORMAL, wxBOLD, false, 'Arial'))
self.staticText2 = wxStaticText(id = wxID_ABOUTSTATICTEXT2, label = 'Boa Constructor application Prototype', name = 'staticText2', parent = self, pos = wxPoint(185, 48), size = wxSize(271, 18), style = 0) self.staticText2.SetBackgroundColour(wxColour(0, 255, 255)) self.staticText2.SetFont(wxFont(11, wxSWISS, wxNORMAL, wxBOLD, false, 'Arial'))
self.staticBitmap1 = wxStaticBitmap(bitmap = wxBitmap('//Images/master3.png', wxBITMAP_TYPE_PNG), id = wxID_ABOUTSTATICBITMAP1, name = 'staticBitmap1', parent = self, pos = wxPoint(16, 80), size = wxSize(600, 408), style = 0)
self.button1 = wxButton(id = wxID_ABOUTBUTTON1, label = 'Close', name = 'button1', parent = self, pos = wxPoint(296, 496), size = wxSize(50, 25), style = 0) EVT_BUTTON(self.button1, wxID_ABOUTBUTTON1, self.OnButton1Button)
def __init__(self, parent): self._init_ctrls(parent)
def OnButton1Button(self, event): self.Close()
The tutorial (Help > Boa Constructor Getting Started) walks you through buidling a simple but realistic application, a simple text editor.
Since Boa itself is in Python, a more challenging exercise might be to replicate parts of Boa using Boa.
Hi David,
Just for the record, all the static GUI elements and frames/dialogs in Boa is in fact built with the Boa designer.
Dynamic elements in the IDE are created by code. This is as it should be.
Almost from the very start the every aspect of the project has been managed/developed in the Boa IDE.
Cheers, Riaan.
Log in to post a comment.
Hello,
I'm getting started with boa.
I learn best from examples
Does anyone have some real world examples
that they could share ??
thanks for the help
Bryan Webb
How about an About box?
#Boa:Dialog:About
from wxPython.wx import *
def create(parent):
return About(parent)
[wxID_ABOUT, wxID_ABOUTBUTTON1, wxID_ABOUTSTATICBITMAP1, wxID_ABOUTSTATICTEXT1, wxID_ABOUTSTATICTEXT2] = map(lambda _init_ctrls: wxNewId(), range(5))
class About(wxDialog):
def _init_utils(self):
# generated method, don't edit
pass
def _init_ctrls(self, prnt):
# generated method, don't edit
wxDialog.__init__(self, id = wxID_ABOUT, name = 'About', parent = prnt, pos = wxPoint(425, 237), size = wxSize(640, 558), style = wxDEFAULT_DIALOG_STYLE, title = 'About DME')
self._init_utils()
self.SetClientSize(wxSize(632, 531))
self.staticText1 = wxStaticText(id = wxID_ABOUTSTATICTEXT1, label = 'The Coolest Application in the World!', name = 'staticText1', parent = self, pos = wxPoint(153, 8), size = wxSize(339, 22), style = wxALIGN_CENTRE)
self.staticText1.SetFont(wxFont(14, wxSWISS, wxNORMAL, wxBOLD, false, 'Arial'))
self.staticText2 = wxStaticText(id = wxID_ABOUTSTATICTEXT2, label = 'Boa Constructor application Prototype', name = 'staticText2', parent = self, pos = wxPoint(185, 48), size = wxSize(271, 18), style = 0)
self.staticText2.SetBackgroundColour(wxColour(0, 255, 255))
self.staticText2.SetFont(wxFont(11, wxSWISS, wxNORMAL, wxBOLD, false, 'Arial'))
self.staticBitmap1 = wxStaticBitmap(bitmap = wxBitmap('//Images/master3.png', wxBITMAP_TYPE_PNG), id = wxID_ABOUTSTATICBITMAP1, name = 'staticBitmap1', parent = self, pos = wxPoint(16, 80), size = wxSize(600, 408), style = 0)
self.button1 = wxButton(id = wxID_ABOUTBUTTON1, label = 'Close', name = 'button1', parent = self, pos = wxPoint(296, 496), size = wxSize(50, 25), style = 0)
EVT_BUTTON(self.button1, wxID_ABOUTBUTTON1, self.OnButton1Button)
def __init__(self, parent):
self._init_ctrls(parent)
def OnButton1Button(self, event):
self.Close()
The tutorial (Help > Boa Constructor Getting Started) walks you through buidling a simple but realistic application, a simple text editor.
Since Boa itself is in Python, a more challenging exercise might be to replicate parts of Boa using Boa.
Hi David,
Just for the record, all the static GUI elements and frames/dialogs in Boa is in fact built with the Boa designer.
Dynamic elements in the IDE are created by code. This is as it should be.
Almost from the very start the every aspect of the project has been managed/developed in the Boa IDE.
Cheers,
Riaan.
The tutorial (Help > Boa Constructor Getting Started) walks you through buidling a simple but realistic application, a simple text editor.
Since Boa itself is in Python, a more challenging exercise might be to replicate parts of Boa using Boa.