Пример #1
0
	def __init__ (self, parent, id): #, wx.wxDefaultPostion, wx.wxDefaultSize):
		wx.wx.TextCtrl.__init__(self,parent,id,"", wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxSIMPLE_BORDER)
		self.SetForegroundColour(wx.wxColor(0,0,0))
		self.SetFont(wx.wxFont(12, wx.wxSWISS, wx.wx.NORMAL, wx.wx.BOLD,False,''))
Пример #2
0
	def __init__ (self, parent, id): #, wx.wxDefaultPostion, wx.wxDefaultSize):
		wx.wx.TextCtrl.__init__(self,parent,id,"", wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxSIMPLE_BORDER)
		self.SetForegroundColour(wx.wxColor(0,0,0))
		self.SetFont(wx.wxFont(12, wx.wxSWISS, wx.wx.NORMAL, wx.wx.BOLD,False,''))
Пример #3
0
	def __init__(self, parent,id):
		wx.wx.Panel.__init__(self, parent, id, wx.wxDefaultPosition, wx.wxDefaultSize, wx.wx.NO_BORDER| wx.wx.TAB_TRAVERSAL)
		#-----------------------------------------------------------------
		#create top list box which will show organisations, employees, etc
		#-----------------------------------------------------------------
		self.list_organisations = wx.wx.ListCtrl(self, ID_ORGANISATIONSLIST,  wx.wxDefaultPosition, wx.wxDefaultSize, wx.wx.LC_REPORT| wx.wx.LC_NO_HEADER| wx.wxSUNKEN_BORDER)
		self.list_organisations.SetForegroundColour(wx.wxColor(74,76,74))
		self.list_organisations.SetFont(wx.wxFont(10, wx.wxSWISS, wx.wx.NORMAL, wx.wx.NORMAL, False, ''))
		#----------------------------------------
		# add some dummy data to the allergy list
		self.list_organisations.InsertColumn(0, "Organisation")
		self.list_organisations.InsertColumn(1, "Employees")
		self.list_organisations.InsertColumn(2, "Address")
		self.list_organisations.InsertColumn(3, "Category/Email")
		self.list_organisations.InsertColumn(4, "Phone")
	
		#-------------------------------------------------------------
		#loop through the scriptdata array and add to the list control
		#note the different syntax for the first column of each row
		#i.e. here > self.list_organisations.InsertItem(x, data[0])!!
		#-------------------------------------------------------------
		items = organisationsdata.items()
		for x in range(len(items)):
			key, data = items[x]
			#print items[x]
			#print x, data[0],data[1],data[2]
			self.list_organisations.InsertItem(x, data[0])
			self.list_organisations.SetItem(x, 1, data[1])
			self.list_organisations.SetItem(x, 2, data[2])
			self.list_organisations.SetItem(x, 3, data[3])
			self.list_organisations.SetItem(x, 4, data[4])
		self.list_organisations.SetItemData(x, key)
		self.list_organisations.SetColumnWidth(0, wx.wx.LIST_AUTOSIZE)
		self.list_organisations.SetColumnWidth(1, wx.wx.LIST_AUTOSIZE)
		self.list_organisations.SetColumnWidth(2, wx.wx.LIST_AUTOSIZE)
		self.list_organisations.SetColumnWidth(3, wx.wx.LIST_AUTOSIZE)
		self.list_organisations.SetColumnWidth(4, wx.wx.LIST_AUTOSIZE)
	
		#--------------------
		#create static labels
		#--------------------
		self.lbl_heading = DarkBlueHeading(self,-1,_("Organisation"))
		self.lbl_org_name = BlueLabel(self,-1,_("Name"))
		self.lbl_Type = BlueLabel(self,-1,_("Office"))
		self.lbl_org_street = BlueLabel(self,-1,("Street"))
		self.lbl_org_suburb = BlueLabel(self,-1,_("Suburb"))
		self.lbl_org_state = BlueLabel(self,-1,_("Region"))                   #eg NSW
		self.lbl_org_zip = wx.wxStaticText(self,id,_("Zip"), wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxALIGN_CENTRE)
		self.lbl_org_zip.SetFont(wx.wxFont(12, wx.wxSWISS, wx.wx.NORMAL, wx.wx.BOLD,False,''))
		self.lbl_org_zip.SetForegroundColour(wx.wxColour(0,0,131))
		#self.lbl_org_zip = BlueLabel(self,-1,"Zip")
		self.lbl_org_category = BlueLabel(self,-1,_("Category"))
		#self.lbl_pers_occupation =  BlueLabel(self,-1,"Occupation")
		self.lbl_org_user1 = BlueLabel(self,-1,_("User1"))
		self.lbl_org_user2 = BlueLabel(self,-1,_("User2"))
		self.lbl_org_user3 = BlueLabel(self,-1,_("User3"))
		self.lbl_org_phone = BlueLabel(self,-1,_("Phone"))
		self.lbl_org_fax = BlueLabel(self,-1,_("Fax"))
		self.lbl_org_email = BlueLabel(self,-1,_("Email"))
		self.lbl_org_internet = BlueLabel(self,-1,_("Internet"))
		self.lbl_org_mobile = BlueLabel(self,-1,_("Mobile"))
		self.lbl_org_memo = BlueLabel(self,-1,_("Memo"))
	
		#--------------------
		#create the textboxes
		#--------------------
		self.txt_org_name = TextBox_RedBold(self,-1)
		self.txt_org_type = TextBox_RedBold(self,-1)       #head office, branch or department
		#self.txt_org_number = TextBox_RedBold(self, -1)
#		self.txt_org_street = cPhraseWheel( parent = self,id = -1 , aMatchProvider= StreetMP(),  pos = wx.wxDefaultPosition, size= wx.wxDefaultSize )
#		self.txt_org_street.SetFont(wx.wxFont(12, wx.wxSWISS, wx.wx.NORMAL, wx.wx.NORMAL, False, ''))
#		self.txt_org_suburb = cPhraseWheel( parent = self,id = -1 , aMatchProvider= MP_urb_by_zip(), selection_only = 1)
#		self.txt_org_suburb.add_callback_on_selection(self.__urb_selected)
#		self.txt_org_zip  = cPhraseWheel( parent = self,id = -1 , aMatchProvider= PostcodeMP(), selection_only = 1,  pos = wx.wxDefaultPosition, size= wx.wxDefaultSize)
		# FIXME: replace with set_callback_on_*
#		self.txt_org_zip.setDependent (self.txt_org_suburb, 'postcode')
	
		#self.txt_org_street = wx.wx.TextCtrl(self, 30,"", wx.wxDefaultPosition, wx.wxDefaultSize, style= wx.wx.TE_MULTILINE| wx.wx.NO_3D| wx.wxSIMPLE_BORDER)
	
		#self.txt_org_street.SetForegroundColour(wx.wxColor(255,0,0))
		#self.txt_org_street.SetFont(wx.wxFont(12, wx.wxSWISS, wx.wx.NORMAL, wx.wx.BOLD,False,''))
		#self.txt_org_suburb = TextBox_RedBold(self,-1)
		#self.txt_org_zip = TextBox_RedBold(self,-1)
		self.txt_org_state = TextBox_RedBold(self,-1) #for user defined fields later
		self.txt_org_user1 = TextBox_BlackNormal(self,-1)
		self.txt_org_user2 = TextBox_BlackNormal(self,-1)
		self.txt_org_user3 = TextBox_BlackNormal(self,-1)
#		self.txt_org_category = cPhraseWheel(self, -1, aMatchProvider = OrgCategoryMP(), selection_only = 1, pos = wx.wxDefaultPosition, size= wx.wxDefaultSize)
		#self.txt_pers_occupation = TextBox_BlackNormal(self,-1)
		self.txt_org_phone = TextBox_BlackNormal(self,-1)
		self.txt_org_fax = TextBox_BlackNormal(self,-1)
		self.txt_org_mobile = TextBox_BlackNormal(self,-1)
		self.txt_org_email = TextBox_BlackNormal(self,-1)
		self.txt_org_internet = TextBox_BlackNormal(self,-1)
		self.txt_org_memo = wx.wx.TextCtrl(self, 30,
				"This company never pays its bills \n"
				"Insist on pre-payment before sending report",
				wx.wxDefaultPosition, wx.wxDefaultSize, style= wx.wx.TE_MULTILINE| wx.wx.NO_3D| wx.wxSIMPLE_BORDER)
		self.txt_org_memo.SetInsertionPoint(0)
		self.txt_org_memo.SetFont(wx.wxFont(12, wx.wxSWISS, wx.wx.NORMAL, wx.wx.NORMAL, False, ''))
		self.combo_type = wx.wxComboBox(self, ID_COMBOTYPE, "", wx.wxDefaultPosition, wx.wxDefaultSize,  divisionTypes , wx.wxCB_READONLY ) # wx.wxCB_DROPDOWN)
		self.combo_type.SetForegroundColour(wx.wxColor(255,0,0))
		self.combo_type.SetFont(wx.wxFont(12, wx.wxSWISS, wx.wx.NORMAL, wx.wx.BOLD,False,''))
		#----------------------
		#create the check boxes
		#----------------------
		self.chbx_postaladdress = wx.wxCheckBox(self, -1,_( " Postal Address "), wx.wxDefaultPosition, wx.wxDefaultSize, wx.wx.NO_BORDER)
	
		self.input_fields = {
			'name': self.txt_org_name,
			'office': self.txt_org_type,
			'category': self.txt_org_category,
			'subtype': self.combo_type,
			'street': self.txt_org_street,
			'urb': self.txt_org_suburb,
			'postcode' : self.txt_org_zip,
			'memo': self.txt_org_memo,
			'phone' : self.txt_org_phone,
			'fax' : self.txt_org_fax,
			'mobile': self.txt_org_mobile,
			'email': self.txt_org_email,
			'jabber': self.txt_org_internet }
		
	
		self._set_controller()	
	
		#-------------------------------------------
		#create the sizers for each line of controls
		#-------------------------------------------
		self.sizer_line0 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line1 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line1a = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line2 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line3 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line4 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line5 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line6 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line7 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line8 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line9 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line10 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line11 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line0.Add((0,10),1)
		#--------------------------------------
		#Heading at top of the left hand column
		#--------------------------------------
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line0.Add((0,0),4)
		else:	
			self.sizer_line0.Add(0,0,4)
		
		self.sizer_line0.Add(self.lbl_heading,40, wx.wxEXPAND| wx.wxALIGN_CENTER)
		
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line0.Add((0,0),48)
		else:
			self.sizer_line0.Add(0,0,48)
		#---------------------------------------------
		#line one:surname, organisation name, category
		#---------------------------------------------
		self.sizer_line1.Add(self.lbl_org_name,4, wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line1.Add(self.txt_org_name,40, wx.wxEXPAND)
		self.sizer_line1.Add(0,0,4)
		self.sizer_line1.Add(self.lbl_org_category,8, wx.wxALIGN_CENTER_VERTICAL, 5)
		self.sizer_line1.Add(self.txt_org_category,36, wx.wxEXPAND)
		#--------------------------------------------------------------
		#line onea:type of organisation:headoffice,branch of department
		#--------------------------------------------------------------
	
		#self.sizer_line1a.Add(0,0,4)
		self.sizer_line1a.Add(self.lbl_Type,4, wx.wxALIGN_LEFT,5)
		self.sizer_line1a.Add(self.combo_type,20, wx.wxEXPAND)
		self.sizer_line1a.Add(self.txt_org_type,20, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line1a.Add((0,0),4)
		else:
			self.sizer_line1a.Add(0,0,4)
		if DISPLAYPERSON == 1:
			self.sizer_line1a.Add(self.lbl_pers_occupation,8, wx.wxALIGN_CENTER_VERTICAL, 5)
			self.sizer_line1a.Add(self.txt_pers_occupation,36, wx.wxEXPAND)
		else:
			self.sizer_line1a.Add(0,0,44)
			#self.lbl_pers_occupation.Hide
			#self.txt_pers_occupation.Hide
	
		#--------------------------------------------
		#line two:street, + blank line under category
		#design of sizer_line2_forphone: (Horizontal box sizer)
		#                           |lbl_org_phone + txt_org_phone   |
		#
		#this is then added to:
		#design of sizer_line2_rightside (verticalbox sizer)
		#                           |blank line                      |
		#                           |sizer_line2_forphone            |
		#
		#sizer_line2_rightside is then added to sizerline2:
		# -----------------------------------------------------------
		# street stuff on sizerline2 | spacer | sizer_line2_rightside|
		#------------------------------------------------------------
		self.sizer_line2_rightside = wx.wx.BoxSizer(wx.wx.VERTICAL)
		self.sizer_line2_forphone = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line2_forphone.Add(self.lbl_org_phone,8, wx.wxGROW, wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line2_forphone.Add(self.txt_org_phone,36, wx.wxEXPAND)
		self.sizer_line2_forfax = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line2_forfax.Add(self.lbl_org_fax,8, wx.wxGROW, wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line2_forfax.Add(self.txt_org_fax,36, wx.wxEXPAND)
		self.sizer_line2_rightside.AddSizer(self.sizer_line2_forphone,2, wx.wxEXPAND)
		self.sizer_line2_rightside.AddSizer(self.sizer_line2_forfax,2, wx.wxEXPAND)
		self.sizer_line2.Add(self.lbl_org_street,4, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line2.Add(self.txt_org_street,40, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line2.Add((0,0),4)
		else:
			self.sizer_line2.Add(0,0,4)
		self.sizer_line2.AddSizer(self.sizer_line2_rightside,44, wx.wxEXPAND)
		#----------------------------------------------------
		#line three:suburb, region, zip code, organisation fax
		#----------------------------------------------------
		self.sizer_line3.Add(self.lbl_org_suburb,4, wx.wxEXPAND| wx.wxALIGN_CENTER_VERTICAL)
		self.sizer_line3.Add(self.txt_org_suburb,40, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line3.Add((0,0),4)
		else:
			self.sizer_line3.Add(0,0,4)
		self.sizer_line3.Add(self.lbl_org_email,8, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL)
		self.sizer_line3.Add(self.txt_org_email,36, wx.wxEXPAND)
		#-----------------------------------------------
		#line four: head office checkbox, email text box
		#-----------------------------------------------
		self.sizer_line4.Add(self.lbl_org_state,4, wx.wxEXPAND| wx.wxALIGN_CENTER)
		self.sizer_line4.Add(self.txt_org_state,20, wx.wxEXPAND)
		self.sizer_line4.Add(self.lbl_org_zip,10, wx.wxGROW| wx.wx.TOP,5)
		self.sizer_line4.Add(self.txt_org_zip,10, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line4.Add((0,0),4)
		else:
			self.sizer_line4.Add(0,0,4)
		self.sizer_line4.Add(self.lbl_org_internet,8, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line4.Add(self.txt_org_internet,36, wx.wxEXPAND)
		#-----------------------------------------------
		#line five: postal address checkbox, internet
		#-----------------------------------------------
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line5.Add((0,0),4)
		else:
			self.sizer_line5.Add(0,0,4)
		self.sizer_line5.Add(self.chbx_postaladdress,40, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line5.Add((0,0),4)
		else:
			self.sizer_line5.Add(0,0,4)
		self.sizer_line5.Add(self.lbl_org_mobile,8, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line5.Add(self.txt_org_mobile,36, wx.wxEXPAND)
		#-----------------------------------------------
		#line six: checkbox branch mobile phone number
		#-----------------------------------------------
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line6.Add((0,20),96)
		else:
			self.sizer_line6.Add(0,20,96)
		#-----------------------------------------------
		#line seven: user1
		#-----------------------------------------------
		self.sizer_line7_user1 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line7_user1.Add(self.lbl_org_user1,4, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line7_user1.Add(self.txt_org_user1,18, wx.wxEXPAND)
		self.sizer_line7_user2 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line7_user2.Add(self.lbl_org_user2,4, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line7_user2.Add(self.txt_org_user2,18, wx.wxEXPAND)
		self.sizer_line7_user3 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line7_user3.Add(self.lbl_org_user3,4, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line7_user3.Add(self.txt_org_user3,18, wx.wxEXPAND)
		self.sizer_line7_right = wx.wx.BoxSizer(wx.wx.VERTICAL)
		self.sizer_line7_right.AddSizer(self.sizer_line7_user1,0, wx.wxEXPAND)
		self.sizer_line7_right.AddSizer(self.sizer_line7_user2,0, wx.wxEXPAND)
		self.sizer_line7_right.AddSizer(self.sizer_line7_user3,0, wx.wxEXPAND)
	
	
		self.sizer_line7.Add(self.lbl_org_memo,4, wx.wxEXPAND| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line7.Add(self.txt_org_memo,40, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line7.Add((0,0),4)
		else:
			self.sizer_line7.Add(0,0,4)
		self.sizer_line7.AddSizer(self.sizer_line7_right,44, wx.wxEXPAND)
		self.nextsizer=  wx.wx.BoxSizer(wx.wx.VERTICAL)
		self.nextsizer.Add(self.list_organisations,3, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.nextsizer.Add((0,10),0)
		else:
			self.nextsizer.Add(0,10,0)
		self.nextsizer.Add(self.sizer_line0,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line1,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line1a,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line2,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line3,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line4,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line5,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line6,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line7,0, wx.wxEXPAND)
		self.mainsizer = wx.wx.BoxSizer(wx.wx.VERTICAL)
		self.mainsizer.AddSizer(self.nextsizer,1, wx.wxEXPAND| wx.wxALL,10)
		self.SetSizer(self.mainsizer)
		self.mainsizer.Fit
		self.SetAutoLayout(True)
		self.Show(True)
Пример #4
0
	def __init__(self, parent,id):
		wx.wx.Panel.__init__(self, parent, id, wx.wxDefaultPosition, wx.wxDefaultSize, wx.wx.NO_BORDER| wx.wx.TAB_TRAVERSAL)
		#-----------------------------------------------------------------
		#create top list box which will show organisations, employees, etc
		#-----------------------------------------------------------------
		self.list_organisations = wx.wx.ListCtrl(self, ID_ORGANISATIONSLIST,  wx.wxDefaultPosition, wx.wxDefaultSize, wx.wx.LC_REPORT| wx.wx.LC_NO_HEADER| wx.wxSUNKEN_BORDER)
		self.list_organisations.SetForegroundColour(wx.wxColor(74,76,74))
		self.list_organisations.SetFont(wx.wxFont(10, wx.wxSWISS, wx.wx.NORMAL, wx.wx.NORMAL, False, ''))
		#----------------------------------------
		# add some dummy data to the allergy list
		self.list_organisations.InsertColumn(0, "Organisation")
		self.list_organisations.InsertColumn(1, "Employees")
		self.list_organisations.InsertColumn(2, "Address")
		self.list_organisations.InsertColumn(3, "Category/Email")
		self.list_organisations.InsertColumn(4, "Phone")
	
		#-------------------------------------------------------------
		#loop through the scriptdata array and add to the list control
		#note the different syntax for the first coloum of each row
		#i.e. here > self.list_organisations.InsertItem(x, data[0])!!
		#-------------------------------------------------------------
		items = organisationsdata.items()
		for x in range(len(items)):
			key, data = items[x]
			#print items[x]
			#print x, data[0],data[1],data[2]
			self.list_organisations.InsertItem(x, data[0])
			self.list_organisations.SetItem(x, 1, data[1])
			self.list_organisations.SetItem(x, 2, data[2])
			self.list_organisations.SetItem(x, 3, data[3])
			self.list_organisations.SetItem(x, 4, data[4])
		self.list_organisations.SetItemData(x, key)
		self.list_organisations.SetColumnWidth(0, wx.wx.LIST_AUTOSIZE)
		self.list_organisations.SetColumnWidth(1, wx.wx.LIST_AUTOSIZE)
		self.list_organisations.SetColumnWidth(2, wx.wx.LIST_AUTOSIZE)
		self.list_organisations.SetColumnWidth(3, wx.wx.LIST_AUTOSIZE)
		self.list_organisations.SetColumnWidth(4, wx.wx.LIST_AUTOSIZE)
	
		#--------------------
		#create static labels
		#--------------------
		self.lbl_heading = DarkBlueHeading(self,-1,_("Organisation"))
		self.lbl_org_name = BlueLabel(self,-1,_("Name"))
		self.lbl_Type = BlueLabel(self,-1,_("Office"))
		self.lbl_org_street = BlueLabel(self,-1,("Street"))
		self.lbl_org_suburb = BlueLabel(self,-1,_("Suburb"))
		self.lbl_org_state = BlueLabel(self,-1,_("Region"))                   #eg NSW
		self.lbl_org_zip = wx.wxStaticText(self,id,_("Zip"), wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxALIGN_CENTRE)
		self.lbl_org_zip.SetFont(wx.wxFont(12, wx.wxSWISS, wx.wx.NORMAL, wx.wx.BOLD,False,''))
		self.lbl_org_zip.SetForegroundColour(wx.wxColour(0,0,131))
		#self.lbl_org_zip = BlueLabel(self,-1,"Zip")
		self.lbl_org_category = BlueLabel(self,-1,_("Category"))
		#self.lbl_pers_occupation =  BlueLabel(self,-1,"Occupation")
		self.lbl_org_user1 = BlueLabel(self,-1,_("User1"))
		self.lbl_org_user2 = BlueLabel(self,-1,_("User2"))
		self.lbl_org_user3 = BlueLabel(self,-1,_("User3"))
		self.lbl_org_phone = BlueLabel(self,-1,_("Phone"))
		self.lbl_org_fax = BlueLabel(self,-1,_("Fax"))
		self.lbl_org_email = BlueLabel(self,-1,_("Email"))
		self.lbl_org_internet = BlueLabel(self,-1,_("Internet"))
		self.lbl_org_mobile = BlueLabel(self,-1,_("Mobile"))
		self.lbl_org_memo = BlueLabel(self,-1,_("Memo"))
	
		#--------------------
		#create the textboxes
		#--------------------
		self.txt_org_name = TextBox_RedBold(self,-1)
		self.txt_org_type = TextBox_RedBold(self,-1)       #head office, branch or department
		#self.txt_org_number = TextBox_RedBold(self, -1)
#		self.txt_org_street = cPhraseWheel( parent = self,id = -1 , aMatchProvider= StreetMP(),  pos = wx.wxDefaultPosition, size= wx.wxDefaultSize )
#		self.txt_org_street.SetFont(wx.wxFont(12, wx.wxSWISS, wx.wx.NORMAL, wx.wx.NORMAL, False, ''))
#		self.txt_org_suburb = cPhraseWheel( parent = self,id = -1 , aMatchProvider= MP_urb_by_zip(), selection_only = 1)
#		self.txt_org_suburb.add_callback_on_selection(self.__urb_selected)
#		self.txt_org_zip  = cPhraseWheel( parent = self,id = -1 , aMatchProvider= PostcodeMP(), selection_only = 1,  pos = wx.wxDefaultPosition, size= wx.wxDefaultSize)
		# FIXME: replace with set_callback_on_*
#		self.txt_org_zip.setDependent (self.txt_org_suburb, 'postcode')
	
		#self.txt_org_street = wx.wx.TextCtrl(self, 30,"", wx.wxDefaultPosition, wx.wxDefaultSize, style= wx.wx.TE_MULTILINE| wx.wx.NO_3D| wx.wxSIMPLE_BORDER)
	
		#self.txt_org_street.SetForegroundColour(wx.wxColor(255,0,0))
		#self.txt_org_street.SetFont(wx.wxFont(12, wx.wxSWISS, wx.wx.NORMAL, wx.wx.BOLD,False,''))
		#self.txt_org_suburb = TextBox_RedBold(self,-1)
		#self.txt_org_zip = TextBox_RedBold(self,-1)
		self.txt_org_state = TextBox_RedBold(self,-1) #for user defined fields later
		self.txt_org_user1 = TextBox_BlackNormal(self,-1)
		self.txt_org_user2 = TextBox_BlackNormal(self,-1)
		self.txt_org_user3 = TextBox_BlackNormal(self,-1)
#		self.txt_org_category = cPhraseWheel(self, -1, aMatchProvider = OrgCategoryMP(), selection_only = 1, pos = wx.wxDefaultPosition, size= wx.wxDefaultSize)
		#self.txt_pers_occupation = TextBox_BlackNormal(self,-1)
		self.txt_org_phone = TextBox_BlackNormal(self,-1)
		self.txt_org_fax = TextBox_BlackNormal(self,-1)
		self.txt_org_mobile = TextBox_BlackNormal(self,-1)
		self.txt_org_email = TextBox_BlackNormal(self,-1)
		self.txt_org_internet = TextBox_BlackNormal(self,-1)
		self.txt_org_memo = wx.wx.TextCtrl(self, 30,
				"This company never pays its bills \n"
				"Insist on pre-payment before sending report",
				wx.wxDefaultPosition, wx.wxDefaultSize, style= wx.wx.TE_MULTILINE| wx.wx.NO_3D| wx.wxSIMPLE_BORDER)
		self.txt_org_memo.SetInsertionPoint(0)
		self.txt_org_memo.SetFont(wx.wxFont(12, wx.wxSWISS, wx.wx.NORMAL, wx.wx.NORMAL, False, ''))
		self.combo_type = wx.wxComboBox(self, ID_COMBOTYPE, "", wx.wxDefaultPosition, wx.wxDefaultSize,  divisionTypes , wx.wxCB_READONLY ) # wx.wxCB_DROPDOWN)
		self.combo_type.SetForegroundColour(wx.wxColor(255,0,0))
		self.combo_type.SetFont(wx.wxFont(12, wx.wxSWISS, wx.wx.NORMAL, wx.wx.BOLD,False,''))
		#----------------------
		#create the check boxes
		#----------------------
		self.chbx_postaladdress = wx.wxCheckBox(self, -1,_( " Postal Address "), wx.wxDefaultPosition, wx.wxDefaultSize, wx.wx.NO_BORDER)
	
		self.input_fields = {
			'name': self.txt_org_name,
			'office': self.txt_org_type,
			'category': self.txt_org_category,
			'subtype': self.combo_type,
			'street': self.txt_org_street,
			'urb': self.txt_org_suburb,
			'postcode' : self.txt_org_zip,
			'memo': self.txt_org_memo,
			'phone' : self.txt_org_phone,
			'fax' : self.txt_org_fax,
			'mobile': self.txt_org_mobile,
			'email': self.txt_org_email,
			'jabber': self.txt_org_internet }
		
	
		self._set_controller()	
	
		#-------------------------------------------
		#create the sizers for each line of controls
		#-------------------------------------------
		self.sizer_line0 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line1 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line1a = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line2 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line3 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line4 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line5 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line6 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line7 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line8 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line9 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line10 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line11 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line0.Add((0,10),1)
		#--------------------------------------
		#Heading at top of the left hand column
		#--------------------------------------
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line0.Add((0,0),4)
		else:	
			self.sizer_line0.Add(0,0,4)
		
		self.sizer_line0.Add(self.lbl_heading,40, wx.wxEXPAND| wx.wxALIGN_CENTER)
		
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line0.Add((0,0),48)
		else:
			self.sizer_line0.Add(0,0,48)
		#---------------------------------------------
		#line one:surname, organisation name, category
		#---------------------------------------------
		self.sizer_line1.Add(self.lbl_org_name,4, wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line1.Add(self.txt_org_name,40, wx.wxEXPAND)
		self.sizer_line1.Add(0,0,4)
		self.sizer_line1.Add(self.lbl_org_category,8, wx.wxALIGN_CENTER_VERTICAL, 5)
		self.sizer_line1.Add(self.txt_org_category,36, wx.wxEXPAND)
		#--------------------------------------------------------------
		#line onea:type of organisation:headoffice,branch of department
		#--------------------------------------------------------------
	
		#self.sizer_line1a.Add(0,0,4)
		self.sizer_line1a.Add(self.lbl_Type,4, wx.wxALIGN_LEFT,5)
		self.sizer_line1a.Add(self.combo_type,20, wx.wxEXPAND)
		self.sizer_line1a.Add(self.txt_org_type,20, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line1a.Add((0,0),4)
		else:
			self.sizer_line1a.Add(0,0,4)
		if DISPLAYPERSON == 1:
			self.sizer_line1a.Add(self.lbl_pers_occupation,8, wx.wxALIGN_CENTER_VERTICAL, 5)
			self.sizer_line1a.Add(self.txt_pers_occupation,36, wx.wxEXPAND)
		else:
			self.sizer_line1a.Add(0,0,44)
			#self.lbl_pers_occupation.Hide
			#self.txt_pers_occupation.Hide
	
		#--------------------------------------------
		#line two:street, + blank line under category
		#design of sizer_line2_forphone: (Horizontal box sizer)
		#                           |lbl_org_phone + txt_org_phone   |
		#
		#this is then added to:
		#design of sizer_line2_rightside (verticalbox sizer)
		#                           |blank line                      |
		#                           |sizer_line2_forphone            |
		#
		#sizer_line2_rightside is then added to sizerline2:
		# -----------------------------------------------------------
		# street stuff on sizerline2 | spacer | sizer_line2_rightside|
		#------------------------------------------------------------
		self.sizer_line2_rightside = wx.wx.BoxSizer(wx.wx.VERTICAL)
		self.sizer_line2_forphone = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line2_forphone.Add(self.lbl_org_phone,8, wx.wxGROW, wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line2_forphone.Add(self.txt_org_phone,36, wx.wxEXPAND)
		self.sizer_line2_forfax = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line2_forfax.Add(self.lbl_org_fax,8, wx.wxGROW, wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line2_forfax.Add(self.txt_org_fax,36, wx.wxEXPAND)
		self.sizer_line2_rightside.AddSizer(self.sizer_line2_forphone,2, wx.wxEXPAND)
		self.sizer_line2_rightside.AddSizer(self.sizer_line2_forfax,2, wx.wxEXPAND)
		self.sizer_line2.Add(self.lbl_org_street,4, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line2.Add(self.txt_org_street,40, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line2.Add((0,0),4)
		else:
			self.sizer_line2.Add(0,0,4)
		self.sizer_line2.AddSizer(self.sizer_line2_rightside,44, wx.wxEXPAND)
		#----------------------------------------------------
		#line three:suburb, region, zip code, organisation fax
		#----------------------------------------------------
		self.sizer_line3.Add(self.lbl_org_suburb,4, wx.wxEXPAND| wx.wxALIGN_CENTER_VERTICAL)
		self.sizer_line3.Add(self.txt_org_suburb,40, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line3.Add((0,0),4)
		else:
			self.sizer_line3.Add(0,0,4)
		self.sizer_line3.Add(self.lbl_org_email,8, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL)
		self.sizer_line3.Add(self.txt_org_email,36, wx.wxEXPAND)
		#-----------------------------------------------
		#line four: head office checkbox, email text box
		#-----------------------------------------------
		self.sizer_line4.Add(self.lbl_org_state,4, wx.wxEXPAND| wx.wxALIGN_CENTER)
		self.sizer_line4.Add(self.txt_org_state,20, wx.wxEXPAND)
		self.sizer_line4.Add(self.lbl_org_zip,10, wx.wxGROW| wx.wx.TOP,5)
		self.sizer_line4.Add(self.txt_org_zip,10, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line4.Add((0,0),4)
		else:
			self.sizer_line4.Add(0,0,4)
		self.sizer_line4.Add(self.lbl_org_internet,8, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line4.Add(self.txt_org_internet,36, wx.wxEXPAND)
		#-----------------------------------------------
		#line five: postal address checkbox, internet
		#-----------------------------------------------
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line5.Add((0,0),4)
		else:
			self.sizer_line5.Add(0,0,4)
		self.sizer_line5.Add(self.chbx_postaladdress,40, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line5.Add((0,0),4)
		else:
			self.sizer_line5.Add(0,0,4)
		self.sizer_line5.Add(self.lbl_org_mobile,8, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line5.Add(self.txt_org_mobile,36, wx.wxEXPAND)
		#-----------------------------------------------
		#line six: checkbox branch mobile phone number
		#-----------------------------------------------
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line6.Add((0,20),96)
		else:
			self.sizer_line6.Add(0,20,96)
		#-----------------------------------------------
		#line seven: user1
		#-----------------------------------------------
		self.sizer_line7_user1 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line7_user1.Add(self.lbl_org_user1,4, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line7_user1.Add(self.txt_org_user1,18, wx.wxEXPAND)
		self.sizer_line7_user2 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line7_user2.Add(self.lbl_org_user2,4, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line7_user2.Add(self.txt_org_user2,18, wx.wxEXPAND)
		self.sizer_line7_user3 = wx.wx.BoxSizer(wx.wx.HORIZONTAL)
		self.sizer_line7_user3.Add(self.lbl_org_user3,4, wx.wxGROW| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line7_user3.Add(self.txt_org_user3,18, wx.wxEXPAND)
		self.sizer_line7_right = wx.wx.BoxSizer(wx.wx.VERTICAL)
		self.sizer_line7_right.AddSizer(self.sizer_line7_user1,0, wx.wxEXPAND)
		self.sizer_line7_right.AddSizer(self.sizer_line7_user2,0, wx.wxEXPAND)
		self.sizer_line7_right.AddSizer(self.sizer_line7_user3,0, wx.wxEXPAND)
	
	
		self.sizer_line7.Add(self.lbl_org_memo,4, wx.wxEXPAND| wx.wxALIGN_CENTER_VERTICAL,5)
		self.sizer_line7.Add(self.txt_org_memo,40, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.sizer_line7.Add((0,0),4)
		else:
			self.sizer_line7.Add(0,0,4)
		self.sizer_line7.AddSizer(self.sizer_line7_right,44, wx.wxEXPAND)
		self.nextsizer=  wx.wx.BoxSizer(wx.wx.VERTICAL)
		self.nextsizer.Add(self.list_organisations,3, wx.wxEXPAND)
		if wx.wxPlatform == '__WXMAC__':
			self.nextsizer.Add((0,10),0)
		else:
			self.nextsizer.Add(0,10,0)
		self.nextsizer.Add(self.sizer_line0,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line1,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line1a,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line2,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line3,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line4,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line5,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line6,0, wx.wxEXPAND)
		self.nextsizer.Add(self.sizer_line7,0, wx.wxEXPAND)
		self.mainsizer = wx.wx.BoxSizer(wx.wx.VERTICAL)
		self.mainsizer.AddSizer(self.nextsizer,1, wx.wxEXPAND| wx.wxALL,10)
		self.SetSizer(self.mainsizer)
		self.mainsizer.Fit
		self.SetAutoLayout(True)
		self.Show(True)