#Boa:FramePanel:panel
import os
import wx
_ = None # i18n
[wxID_PANEL, wxID_PANELBT_SEARCH, wxID_PANELLBL_COMPANY_NAME,
wxID_PANELLBL_COVER_FAX, wxID_PANELLBL_COVER_PATH, wxID_PANELLBL_PHONE,
wxID_PANELLBL_SENDER_NAME, wxID_PANELLBL_TOWN, wxID_PANELTXT_COVER_COMP_NAME,
wxID_PANELTXT_COVER_FAX, wxID_PANELTXT_COVER_NUMBER,
wxID_PANELTXT_COVER_PATH, wxID_PANELTXT_COVER_SENDER_NAME,
wxID_PANELTXT_COVER_TOWN,
] = [wx.NewId() for _init_ctrls in range(14)]
class panel(wx.Panel):
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Panel.__init__(self, id=wxID_PANEL, name=u'panel', parent=prnt,
pos=wx.Point(382, 406), size=wx.Size(463, 233),
style=wx.TAB_TRAVERSAL)
self.SetClientSize(wx.Size(455, 206))
self.SetToolTipString(u'')
self.lbl_company_name = wx.StaticText(id=wxID_PANELLBL_COMPANY_NAME,
label=u'Comp. name', name=u'_lbl_company_name', parent=self,
pos=wx.Point(8, 16), size=wx.Size(80, 13), style=0)
self.lbl_company_name.SetToolTipString(u'')
self.lbl_company_name.SetToolTipString(u'')
self.txt_cover_comp_name = wx.TextCtrl(id=wxID_PANELTXT_COVER_COMP_NAME,
name=u'txt_cover_comp_name', parent=self, pos=wx.Point(96, 14),
size=wx.Size(100, 21), style=0, value=u'')
self.txt_cover_comp_name.SetToolTipString(u'')
self.txt_cover_comp_name.SetToolTipString(u'')
self.lbl_sender_name = wx.StaticText(id=wxID_PANELLBL_SENDER_NAME,
label=u'Sender name', name=u'_lbl_sender_name', parent=self,
pos=wx.Point(8, 45), size=wx.Size(80, 13), style=0)
self.lbl_sender_name.SetToolTipString(u'')
self.txt_cover_sender_name = wx.TextCtrl(id=wxID_PANELTXT_COVER_SENDER_NAME,
name=u'txt_cover_sender_name', parent=self, pos=wx.Point(96, 42),
size=wx.Size(100, 21), style=0, value=u'')
self.txt_cover_sender_name.SetToolTipString(u'')
self.lbl_town = wx.StaticText(id=wxID_PANELLBL_TOWN, label=u'Town',
name=u'lbl_town', parent=self, pos=wx.Point(8, 74),
size=wx.Size(64, 13), style=0)
self.lbl_town.SetToolTipString(u'')
self.txt_cover_town = wx.TextCtrl(id=wxID_PANELTXT_COVER_TOWN,
name=u'txt_cover_town', parent=self, pos=wx.Point(96, 72),
size=wx.Size(100, 21), style=0, value=u'')
self.lbl_phone = wx.StaticText(id=wxID_PANELLBL_PHONE,
label=u'Phone numb.', name=u'_lbl_phone', parent=self,
pos=wx.Point(240, 16), size=wx.Size(80, 13), style=0)
self.txt_cover_number = wx.TextCtrl(id=wxID_PANELTXT_COVER_NUMBER,
name=u'txt_cover_number', parent=self, pos=wx.Point(336, 14),
size=wx.Size(100, 21), style=0, value=u'')
self.txt_cover_number.SetToolTipString(u'')
self.txt_cover_path = wx.TextCtrl(id=wxID_PANELTXT_COVER_PATH,
name=u'txt_cover_path', parent=self, pos=wx.Point(96, 128),
size=wx.Size(100, 21), style=0, value=u'')
self.txt_cover_path.SetToolTipString(u'')
self.lbl_cover_path = wx.StaticText(id=wxID_PANELLBL_COVER_PATH,
label=u'Cover path', name=u'lbl_cover_path', parent=self,
pos=wx.Point(8, 130), size=wx.Size(80, 13), style=0)
self.lbl_cover_path.SetToolTipString(u'')
self.bt_search = wx.Button(id=wxID_PANELBT_SEARCH, label=u'Search',
name=u'bt_search', parent=self, pos=wx.Point(200, 128),
size=wx.Size(64, 23), style=0)
self.bt_search.SetToolTipString(u'')
self.bt_search.Bind(wx.EVT_BUTTON, self.OnBt_searchButton,
id=wxID_PANELBT_SEARCH)
self.lbl_cover_fax = wx.StaticText(id=wxID_PANELLBL_COVER_FAX,
label=u'Fax numb.', name=u'lbl_cover_fax', parent=self,
pos=wx.Point(240, 45), size=wx.Size(88, 13), style=0)
self.lbl_cover_fax.SetToolTipString(u'')
self.txt_cover_fax = wx.TextCtrl(id=wxID_PANELTXT_COVER_FAX,
name=u'txt_cover_fax', parent=self, pos=wx.Point(336, 42),
size=wx.Size(100, 21), style=0, value=u'')
self.txt_cover_fax.SetToolTipString(u'')
def __init__(self, parent, val_pass):
self._init_ctrls(parent)
self.paths, self.ren, self.opt_cls = val_pass
from library import i18n
global _
_ = i18n.i18n(default=self.paths.language, dir_path=self.paths.my_path)
def ctrlWidgetsStatus(self):
#Enable or disable the controls
pass
def OnBt_searchButton(self, event):
dlg = wx.FileDialog(self, _("search"), os.getcwd())
f_name = None
if dlg.ShowModal() == wx.ID_OK:
f_name = dlg.GetPath()
if not f_name:
return
self.txt_cover_path.SetValue(f_name)
|