RE: [Boa Constr] wxMaskedTextctrl not defined
Status: Beta
Brought to you by:
riaan
From: Max S. <max@TheSlimmers.net> - 2004-05-27 22:52:07
|
Seems there is a bug in Boa, when droping a masked numeric control it includes "from wxPython.lib.maskednumctrl import *" but nothing is included if droping a maskedTextCtrl. so you can manually include: "from wxPython.lib.maskededit import *" It then runs, I wasn't able to insert spaces, but the default mask is XXXXXXXX... not sure but that may not include spaces. You should read the docs from wxpython and also look at the demo and doc in the modules themselves for details on how to work all of the features. The demo is a great way to figure out how to model things... good luck, max > -----Original Message----- > From: boa...@li... > [mailto:boa...@li...]On Behalf Of > acidblue > Sent: Thursday, May 27, 2004 11:31 AM > To: boa...@li... > Subject: [Boa Constr] wxMaskedTextctrl not defined > > > 'global name wxMaskedTextctrl not defined' > Thats the error messge I getting in my program. > Here's my code: > Boa:Frame:wxFrame1 > > from wxPython.wx import * > > def create(parent): > return wxFrame1(parent) > > [wxID_WXFRAME1, wxID_WXFRAME1PANEL1, wxID_WXFRAME1STARTDATEBOX, > ] = map(lambda _init_ctrls: wxNewId(), range(3)) > > class wxFrame1(wxFrame): > def _init_ctrls(self, prnt): > # generated method, don't edit > wxFrame.__init__(self, id=wxID_WXFRAME1, name='', parent=prnt, > pos=wxPoint(255, 160), size=wxSize(600, 427), > style=wxDEFAULT_FRAME_STYLE, title='wxFrame1') > self.SetClientSize(wxSize(592, 393)) > > self.panel1 = wxPanel(id=wxID_WXFRAME1PANEL1, name='panel1', > parent=self, pos=wxPoint(0, 0), size=wxSize(592, 393), > style=wxTAB_TRAVERSAL) > > self.StartDateBox = wxMaskedTextCtrl(id=wxID_WXFRAME1STARTDATEBOX, > name='StartDateBox', parent=self.panel1, > pos=wxPoint(192, 48), > size=wxSize(100, 21), style=0, value=' / / ') > self.StartDateBox.SetMask('XX/XX/XXXX') > self.StartDateBox.SetAutoformat('') > self.StartDateBox.SetDatestyle('MDY') > self.StartDateBox.SetFormatcodes('') > self.StartDateBox.SetDescription('') > self.StartDateBox.SetExcludeChars('') > self.StartDateBox.SetValidRegex('') > EVT_TEXT_ENTER(self.StartDateBox, wxID_WXFRAME1STARTDATEBOX, > self.OnStartDateBoxTextEnter) > > def __init__(self, parent): > self._init_ctrls(parent) > > def OnStartDateBoxTextEnter(self, event) > event.Skip() > > > > I don't understand why I'm getting this error, do I have to define the > masked text ctrl like a variable? > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Boa-constructor-users mailing list > Boa...@li... > https://lists.sourceforge.net/lists/listinfo/boa-constructor-users > |