def __init__(self, parent, titre=_(u"Saisie d'une compagnie")): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX) self.parent = parent self.titre = titre # Nom self.staticbox_nom_staticbox = wx.StaticBox(self, -1, _(u"Nom de la compagnie")) self.label_nom = wx.StaticText(self, -1, _(u"Nom :")) self.ctrl_nom = wx.TextCtrl(self, -1, u"") # Coords self.staticbox_coords_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) self.label_ville = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.label_tel = wx.StaticText(self, -1, _(u"Tél. :")) self.ctrl_tel = CTRL_Saisie_tel.Tel(self, intitule=_(u"restaurateur")) self.label_fax = wx.StaticText(self, -1, _(u"Fax. :")) self.ctrl_fax = CTRL_Saisie_tel.Tel(self, intitule=_(u"fax")) self.label_mail = wx.StaticText(self, -1, _(u"Email :")) self.ctrl_mail = CTRL_Saisie_mail.Mail(self) self.bouton_aide = CTRL_Bouton_image.CTRL(self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL(self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL(self, id=wx.ID_CANCEL, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide)
def __init__(self, parent): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX) self.parent = parent self.staticbox_adresse_staticbox = wx.StaticBox(self, -1, _(u"Adresse")) self.staticbox_coords_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées")) self.staticbox_identite_staticbox = wx.StaticBox(self, -1, _(u"Identité")) self.label_nom = wx.StaticText(self, -1, _(u"Nom :")) self.ctrl_nom = wx.TextCtrl(self, -1, "") self.label_prenom = wx.StaticText(self, -1, _(u"Prénom :")) self.ctrl_prenom = wx.TextCtrl(self, -1, "") self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, "") self.label_cp = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.label_tel = wx.StaticText(self, -1, _(u"Tél. Cabinet :")) self.ctrl_tel = CTRL_Saisie_tel.Tel(self, intitule=_(u"cabinet")) self.label_mobile = wx.StaticText(self, -1, _(u"Tél. Mobile :")) self.ctrl_mobile = CTRL_Saisie_tel.Tel(self, intitule=_(u"mobile")) self.bouton_aide = CTRL_Bouton_image.CTRL(self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL(self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL(self, id=wx.ID_CANCEL, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide) self.ctrl_nom.Bind(wx.EVT_KILL_FOCUS, self.OnKillFocusNom)
def __init__(self, parent, IDcontact=None): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX) self.parent = parent self.IDcontact = IDcontact self.staticbox_identite_staticbox = wx.StaticBox( self, -1, _(u"Identité")) self.label_nom = wx.StaticText(self, -1, _(u"Nom :")) self.ctrl_nom = wx.TextCtrl(self, -1, "") self.label_prenom = wx.StaticText(self, -1, _(u"Prénom :")) self.ctrl_prenom = wx.TextCtrl(self, -1, "") self.staticbox_coords_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, "") self.label_cp = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.label_tel = wx.StaticText(self, -1, _(u"Tél. fixe :")) self.ctrl_tel = CTRL_Saisie_tel.Tel(self, intitule=_(u"domicile")) self.label_mobile = wx.StaticText(self, -1, _(u"Tél. portable :")) self.ctrl_mobile = CTRL_Saisie_tel.Tel(self, intitule=_(u"mobile")) self.label_mail = wx.StaticText(self, -1, _(u"Email :")) self.ctrl_mail = CTRL_Saisie_mail.Mail(self) self.label_site = wx.StaticText(self, -1, _(u"Site internet :")) self.ctrl_site = wx.TextCtrl(self, -1, "") self.staticbox_memo_staticbox = wx.StaticBox(self, -1, _(u"Mémo")) self.ctrl_memo = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE) self.ctrl_memo.SetMinSize((300, 90)) self.bouton_aide = CTRL_Bouton_image.CTRL( self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL( self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL( self, id=wx.ID_CANCEL, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide) # Init if self.IDcontact: self.Importation()
def Remplissage(self): """ Remplissage """ self.dictControles = {} # Création des colonnes largeurColonneDonnee = 300 self.InsertColumn(0, _(u"Champ"), width=180) self.InsertColumn(1, _(u"Valeur"), width=largeurColonneDonnee + 5, format=ULC.ULC_FORMAT_LEFT) # Création des lignes self.liste_lignes = [ { "code": "nom", "label": _(u"Nom de famille"), "ctrl": wx.TextCtrl(self, -1, "", size=(largeurColonneDonnee, -1)) }, { "code": "prenom", "label": _(u"Prénom"), "ctrl": wx.TextCtrl(self, -1, "", size=(largeurColonneDonnee, -1)) }, { "code": "date_naiss", "label": _(u"Date de naissance"), "ctrl": CTRL_Saisie_date.Date2(self, size=(largeurColonneDonnee, -1)) }, { "code": "ville_naiss", "label": _(u"Ville de naissance"), "ctrl": CTRL_Saisie_adresse.Adresse(self, size=(largeurColonneDonnee, -1)) }, { "code": "adresse", "label": _(u"Adresse"), "ctrl": Adresse(self, IDindividu=self.IDindividu, size=(largeurColonneDonnee, 100)) }, { "code": "tel_domicile", "label": _(u"Tél. Domicile"), "ctrl": CTRL_Saisie_tel.Tel(self, intitule=_(u"Domicile"), size=(largeurColonneDonnee, -1)) }, { "code": "tel_mobile", "label": _(u"Tél. Mobile"), "ctrl": CTRL_Saisie_tel.Tel(self, intitule=_(u"Mobile"), size=(largeurColonneDonnee, -1)) }, { "code": "mail", "label": _(u"Email"), "ctrl": CTRL_Saisie_mail.Mail(self, size=(largeurColonneDonnee, -1)) }, { "code": "profession", "label": _(u"Profession"), "ctrl": wx.TextCtrl(self, -1, "", size=(largeurColonneDonnee, -1)) }, { "code": "employeur", "label": _(u"Employeur"), "ctrl": wx.TextCtrl(self, -1, "", size=(largeurColonneDonnee, -1)) }, { "code": "travail_tel", "label": _(u"Tél. Pro."), "ctrl": CTRL_Saisie_tel.Tel(self, intitule=_(u"Tél.Pro."), size=(largeurColonneDonnee, -1)) }, { "code": "travail_mail", "label": _(u"Email Pro."), "ctrl": CTRL_Saisie_mail.Mail(self, size=(largeurColonneDonnee, -1)) }, ] index = 0 for ligne in self.liste_lignes: # Colonne Nom de colonne label = _(u" Colonne %d") % (index + 1) self.InsertStringItem(index, ligne["label"], it_kind=1) self.SetItemPyData(index, ligne) # Type de donnée item = self.GetItem(index, 1) ctrl = ligne["ctrl"] ctrl.SetBackgroundColour(wx.Colour(255, 255, 255)) item.SetWindow(ctrl) self.SetItem(item) self.dictControles[index] = { "code": ligne["code"], "ctrl": ctrl, "item": item } index += 1
def __init__(self, parent, empecheAnnulation=False): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE) self.parent = parent self.empecheAnnulation = empecheAnnulation self.logo = None intro = _( u"Saisissez ici les informations concernant l'organisateur. Ces données seront utilisées dans les différents documents édités par le logiciel." ) titre = _(u"L'organisateur") self.ctrl_bandeau = CTRL_Bandeau.Bandeau( self, titre=titre, texte=intro, hauteurHtml=30, nomImage="Images/32x32/Organisateur.png") self.staticbox_nom_staticbox = wx.StaticBox( self, -1, _(u"Nom de l'organisateur")) self.label_nom = wx.StaticText(self, -1, _(u"Nom :")) self.ctrl_nom = wx.TextCtrl(self, -1, u"") self.staticbox_coords_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) self.label_adresse = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_adresse = CTRL_Saisie_adresse.Adresse(self) self.label_tel = wx.StaticText(self, -1, _(u"Tél :")) self.ctrl_tel = CTRL_Saisie_tel.Tel(self, intitule=_(u"siège")) self.label_mail = wx.StaticText(self, -1, _(u"Email :")) self.ctrl_mail = CTRL_Saisie_mail.Mail(self) self.label_fax = wx.StaticText(self, -1, _(u"Fax :")) self.ctrl_fax = CTRL_Saisie_tel.Tel(self, intitule=_(u"fax")) self.label_site = wx.StaticText(self, -1, _(u"Site internet :")) self.ctrl_site = wx.TextCtrl(self, -1, u"") self.staticbox_numeros_staticbox = wx.StaticBox( self, -1, _(u"Numéros d'identification")) self.label_agrement = wx.StaticText(self, -1, _(u"Numéro agrément :")) self.ctrl_agrement = wx.TextCtrl(self, -1, u"") self.label_siret = wx.StaticText(self, -1, _(u"Numéro SIRET :")) self.ctrl_siret = wx.TextCtrl(self, -1, u"") self.label_ape = wx.StaticText(self, -1, _(u"Code APE :")) self.ctrl_ape = wx.TextCtrl(self, -1, u"") self.staticbox_logo_staticbox = wx.StaticBox(self, -1, _(u"Logo")) self.ctrl_logo = CTRL_Logo.CTRL(self, qualite=100, couleurFond=wx.Colour(255, 255, 255), size=(83, 83)) self.bouton_modifier = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Modifier.png"), wx.BITMAP_TYPE_ANY)) self.bouton_supprimer = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Supprimer.png"), wx.BITMAP_TYPE_ANY)) self.bouton_visualiser = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Loupe.png"), wx.BITMAP_TYPE_ANY)) self.bouton_aide = CTRL_Bouton_image.CTRL( self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL( self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL( self, id=wx.ID_CANCEL, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") # Empêche l'annulation if self.empecheAnnulation == True: self.bouton_annuler.Show(False) self.EnableCloseButton(False) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide) self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonModifierLogo, self.bouton_modifier) self.Bind(wx.EVT_BUTTON, self.OnBoutonSupprimerLogo, self.bouton_supprimer) self.Bind(wx.EVT_BUTTON, self.OnBoutonVisualiserLogo, self.bouton_visualiser) self.Importation()
def __init__(self, parent, IDactivite=None, nouvelleActivite=False): wx.Panel.__init__(self, parent, id=-1, name="panel_generalites", style=wx.TAB_TRAVERSAL) self.parent = parent self.IDactivite = IDactivite self.listeInitialeGroupes = [] # Nom Activité self.staticbox_nom_staticbox = wx.StaticBox(self, -1, _(u"Nom de l'activité")) self.label_nom_complet = wx.StaticText(self, -1, _(u"Nom complet :")) self.ctrl_nom_complet = wx.TextCtrl(self, -1, u"") self.label_nom_abrege = wx.StaticText(self, -1, _(u"Nom abrégé :")) self.ctrl_nom_abrege = wx.TextCtrl(self, -1, u"") # Coords self.staticbox_coords_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées")) self.radio_coords_org = wx.RadioButton(self, -1, u"", style=wx.RB_GROUP) self.label_coords_org = wx.StaticText( self, -1, _(u"Identique à l'organisateur")) self.radio_coords_autres = wx.RadioButton(self, -1, u"") self.label_coords_autres = wx.StaticText(self, -1, _(u"Autres coordonnées :")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) self.label_ville = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.label_tel = wx.StaticText(self, -1, _(u"Tél :")) self.ctrl_tel = CTRL_Saisie_tel.Tel( self, intitule=_(u"contact pour cette activité")) self.label_mail = wx.StaticText(self, -1, _(u"Email :")) self.ctrl_mail = CTRL_Saisie_mail.Mail(self) self.label_fax = wx.StaticText(self, -1, _(u"Fax :")) self.ctrl_fax = CTRL_Saisie_tel.Tel(self, intitule=_(u"fax")) self.label_site = wx.StaticText(self, -1, _(u"Site internet :")) self.ctrl_site = wx.TextCtrl(self, -1, u"") # Responsables self.staticbox_responsables_staticbox = wx.StaticBox( self, -1, _(u"Responsables de l'activité")) self.ctrl_responsables = OL_Responsables_activite.ListView( self, IDactivite=IDactivite, id=-1, name="OL_responsables", style=wx.LC_REPORT | wx.SUNKEN_BORDER | wx.LC_SINGLE_SEL | wx.LC_HRULES | wx.LC_VRULES) self.ctrl_responsables.SetMinSize((-1, 40)) self.ctrl_responsables.MAJ() self.bouton_ajouter_responsable = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Ajouter.png"), wx.BITMAP_TYPE_ANY)) self.bouton_modifier_responsable = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Modifier.png"), wx.BITMAP_TYPE_ANY)) self.bouton_supprimer_responsable = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Supprimer.png"), wx.BITMAP_TYPE_ANY)) self.bouton_defaut_responsable = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Ok.png"), wx.BITMAP_TYPE_ANY)) # Code comptable self.staticbox_code_comptable_staticbox = wx.StaticBox( self, -1, _(u"Code comptable")) self.ctrl_code_comptable = wx.TextCtrl(self, -1, "") # Groupes d'activités self.staticbox_groupes_staticbox = wx.StaticBox( self, -1, _(u"Regroupement d'activités")) self.ctrl_groupes = CTRL_Groupes_activite(self) self.ctrl_groupes.SetMinSize((-1, 40)) # Logo self.staticbox_logo_staticbox = wx.StaticBox(self, -1, _(u"Logo")) self.radio_logo_org = wx.RadioButton(self, -1, u"", style=wx.RB_GROUP) self.label_logo_org = wx.StaticText(self, -1, _(u"Identique a l'organisateur")) self.radio_logo_autre = wx.RadioButton(self, -1, u"") self.label_logo_autre = wx.StaticText(self, -1, _(u"Autre logo :")) self.ctrl_logo = CTRL_Logo.CTRL(self, qualite=100, couleurFond=wx.Colour(255, 255, 255), size=(83, 83)) self.bouton_modifier_logo = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Modifier.png"), wx.BITMAP_TYPE_ANY)) self.bouton_supprimer_logo = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Supprimer.png"), wx.BITMAP_TYPE_ANY)) self.bouton_visualiser_logo = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Loupe.png"), wx.BITMAP_TYPE_ANY)) # Validité self.staticbox_validite_staticbox = wx.StaticBox( self, -1, _(u"Dates de validité")) self.radio_illimitee = wx.RadioButton(self, -1, u"", style=wx.RB_GROUP) self.label_illimitee = wx.StaticText(self, -1, _(u"Illimitée")) self.radio_limitee = wx.RadioButton(self, -1, u"") self.label_validite_du = wx.StaticText(self, -1, u"Du") self.ctrl_validite_du = CTRL_Saisie_date.Date(self) self.label_validite_au = wx.StaticText(self, -1, _(u"au")) self.ctrl_validite_au = CTRL_Saisie_date.Date(self) # Public self.staticbox_public_staticbox = wx.StaticBox(self, -1, _(u"Public")) self.ctrl_public = CTRL_Public(self) listePublic = [ (1, _(u"Représentants"), False), (2, _(u"Enfants"), False), ] self.ctrl_public.SetData(listePublic) self.ctrl_public.SetMinSize((-1, 40)) # Nombre max d'inscrits self.staticbox_limitation_inscrits_staticbox = wx.StaticBox( self, -1, _(u"Limitation du nombre d'inscrits")) self.check_limitation_inscrits = wx.CheckBox( self, -1, _(u"Nombre d'inscrits max. :")) self.ctrl_limitation_inscrits = wx.SpinCtrl(self, -1, size=(80, -1), min=1, max=99999) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioCoords, self.radio_coords_org) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioCoords, self.radio_coords_autres) self.Bind(wx.EVT_BUTTON, self.OnAjouterResponsable, self.bouton_ajouter_responsable) self.Bind(wx.EVT_BUTTON, self.OnModifierResponsable, self.bouton_modifier_responsable) self.Bind(wx.EVT_BUTTON, self.OnSupprimerResponsable, self.bouton_supprimer_responsable) self.Bind(wx.EVT_BUTTON, self.OnResponsableDefaut, self.bouton_defaut_responsable) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioLogo, self.radio_logo_org) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioLogo, self.radio_logo_autre) self.Bind(wx.EVT_BUTTON, self.OnModifierLogo, self.bouton_modifier_logo) self.Bind(wx.EVT_BUTTON, self.OnSupprimerLogo, self.bouton_supprimer_logo) self.Bind(wx.EVT_BUTTON, self.OnVisualiserLogo, self.bouton_visualiser_logo) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioValidite, self.radio_illimitee) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioValidite, self.radio_limitee) self.Bind(wx.EVT_CHECKBOX, self.OnCheckLimitationInscrits, self.check_limitation_inscrits) # Importation if nouvelleActivite == False: self.Importation() # Initialisation des contrôles self.OnRadioCoords(None) self.OnRadioLogo(None) self.OnRadioValidite(None) self.OnCheckLimitationInscrits(None)
def __init__(self, parent, IDindividu=None): wx.Panel.__init__(self, parent, id=-1, name="panel_coords", style=wx.TAB_TRAVERSAL) self.parent = parent self.IDindividu = IDindividu self.cp = None self.ville = None self.majEffectuee = False # Adresse self.staticbox_adresse = wx.StaticBox(self, -1, _(u"Adresse de résidence")) self.radio_adresse_auto = wx.RadioButton(self, -1, "", style=wx.RB_GROUP) self.label_adresse_auto = wx.StaticText(self, -1, _(u"L'adresse de :")) self.ctrl_adresse_auto = Adresse_auto(self) self.radio_adresse_manuelle = wx.RadioButton(self, -1, "") self.label_adresse_manuelle = wx.StaticText(self, -1, _(u"L'adresse suivante :")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE) self.label_cp = wx.StaticText(self, -1, _(u"CP :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.label_secteur = wx.StaticText(self, -1, _(u"Secteur :")) self.ctrl_secteur = Secteur(self) self.bouton_secteurs = wx.Button(self, -1, "...", size=(20, 20)) # Coordonnées self.staticbox_coords = wx.StaticBox(self, -1, _(u"Coordonnées")) self.label_tel_domicile = wx.StaticText(self, -1, _(u"Domicile :")) self.ctrl_tel_domicile = CTRL_Saisie_tel.Tel(self, intitule=_(u"Domicile")) self.label_tel_mobile = wx.StaticText(self, -1, _(u"Mobile :")) self.ctrl_tel_mobile = CTRL_Saisie_tel.Tel(self, intitule=_(u"mobile")) self.label_tel_fax = wx.StaticText(self, -1, _(u"Fax :")) self.ctrl_tel_fax = CTRL_Saisie_tel.Tel(self, intitule=_(u"fax")) self.label_mail = wx.StaticText(self, -1, _(u"Email :")) self.ctrl_mail = CTRL_Saisie_mail.Mail(self) self.bouton_mail_perso = wx.BitmapButton( self, 900, wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Emails_exp.png"), wx.BITMAP_TYPE_ANY)) # Activité professionnelle self.staticbox_travail = wx.StaticBox(self, -1, _(u"Activité professionnelle")) self.label_categorie = wx.StaticText(self, -1, _(u"Catégorie :")) self.ctrl_categorie = Categorie(self) self.label_travail_tel = wx.StaticText(self, -1, _(u"Tél :")) self.ctrl_travail_tel = CTRL_Saisie_tel.Tel(self, intitule=_(u"travail")) self.label_profession = wx.StaticText(self, -1, _(u"Profession :")) self.ctrl_profession = wx.TextCtrl(self, -1, "") self.label_travail_fax = wx.StaticText(self, -1, _(u"Fax :")) self.ctrl_travail_fax = CTRL_Saisie_tel.Tel(self, intitule=_(u"fax")) self.label_employeur = wx.StaticText(self, -1, _(u"Employeur :")) self.ctrl_employeur = wx.TextCtrl(self, -1, "") self.label_travail_mail = wx.StaticText(self, -1, _(u"Mail :")) self.ctrl_travail_mail = CTRL_Saisie_mail.Mail(self) self.bouton_mail_travail = wx.BitmapButton( self, 800, wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Emails_exp.png"), wx.BITMAP_TYPE_ANY)) # Listes de diffusion self.staticbox_listesdiff = wx.StaticBox(self, -1, _(u"Listes de diffusion")) self.label_listesdiff = wx.StaticText( self, -1, _(u"Inscrire aux listes suivantes :")) self.ctrl_listesdiff = CTRL_diff(self) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioAdresse, self.radio_adresse_auto) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioAdresse, self.radio_adresse_manuelle) self.Bind(wx.EVT_BUTTON, self.OnGestionSecteurs, self.bouton_secteurs) self.Bind(wx.EVT_BUTTON, self.OnEnvoiEmail, self.bouton_mail_travail) self.Bind(wx.EVT_BUTTON, self.OnEnvoiEmail, self.bouton_mail_perso) self.ctrl_adresse_auto.Bind(wx.EVT_CHOICE, self.OnTextAdresse) self.ctrl_rue.Bind(wx.EVT_TEXT, self.OnTextAdresse) self.ctrl_ville.ctrl_cp.Bind(wx.EVT_TEXT, self.OnTextAdresse) self.ctrl_ville.ctrl_ville.Bind(wx.EVT_TEXT, self.OnTextAdresse)
def __init__(self, parent): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.THICK_FRAME) self.parent = parent # Nom self.staticbox_nom_staticbox = wx.StaticBox(self, -1, _(u"Nom de l'école")) self.label_nom = wx.StaticText(self, -1, _(u"Nom :"), size=(60, -1), style=wx.ALIGN_RIGHT) self.ctrl_nom = wx.TextCtrl(self, -1, u"") # Coords self.staticbox_coords_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :"), size=(60, -1), style=wx.ALIGN_RIGHT) self.ctrl_rue = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) self.label_ville = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.label_tel = wx.StaticText(self, -1, _(u"Tél. :")) self.ctrl_tel = CTRL_Saisie_tel.Tel(self, intitule=u"école") self.label_fax = wx.StaticText(self, -1, _(u"Fax. :")) self.ctrl_fax = CTRL_Saisie_tel.Tel(self, intitule=_(u"fax")) self.label_mail = wx.StaticText(self, -1, _(u"Email :")) self.ctrl_mail = CTRL_Saisie_mail.Mail(self) # Secteurs self.staticbox_secteurs_staticbox = wx.StaticBox( self, -1, _(u"Secteurs rattachés")) self.label_secteurs = wx.StaticText(self, -1, _(u"Secteurs :"), size=(60, -1), style=wx.ALIGN_RIGHT) self.ctrl_secteurs = CTRL_Secteurs(self) self.ctrl_secteurs.SetMinSize((-1, 100)) self.bouton_aide = CTRL_Bouton_image.CTRL( self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL( self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL( self, id=wx.ID_CANCEL, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide)