def __init__(self, parent, IDactivite=None, IDtarif=None): wx.Panel.__init__(self, parent, id=-1, style=wx.TAB_TRAVERSAL) self.parent = parent self.IDactivite = IDactivite self.IDtarif = IDtarif # Etiquettes self.check_etiquettes = wx.CheckBox( self, -1, _(u"Uniquement pour les étiquettes cochées :")) self.ctrl_etiquettes = CTRL_Etiquettes.CTRL(self, listeActivites=[ self.IDactivite, ], nomActivite=u"Activité", activeMenu=False) self.ctrl_etiquettes.MAJ() self.__set_properties() self.__do_layout() # Binds self.Bind(wx.EVT_CHECKBOX, self.OnCheckEtiquettes, self.check_etiquettes) # Init self.OnCheckEtiquettes(None)
def __init__(self, parent, listeActivites=[], nomActivite=None): 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 self.listeActivites = listeActivites self.SetTitle(_(u"Saisie d'une étiquette")) # Label self.staticbox_label_staticbox = wx.StaticBox( self, -1, _(u"Label de l'étiquette")) self.ctrl_label = wx.TextCtrl(self, -1, "") # Couleur self.staticbox_couleur_staticbox = wx.StaticBox( self, -1, _(u"Couleur")) self.ctrl_couleur = csel.ColourSelect(self, -1, "", (255, 255, 255), size=(40, 22)) # Parent self.staticbox_parent_staticbox = wx.StaticBox( self, -1, _(u"Sélection du parent")) self.ctrl_parent = CTRL_Etiquettes.CTRL(self, listeActivites=listeActivites, nomActivite=nomActivite, activeMenu=False) self.ctrl_parent.MAJ() self.ctrl_parent.SetID(None) # Options self.staticbox_options_staticbox = wx.StaticBox( self, -1, _(u"Options")) self.ctrl_active = wx.CheckBox(self, -1, _(u"Etiquette active")) self.ctrl_active.SetValue(True) # Commandes 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.OnBoutonAide, self.bouton_aide) self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) wx.CallLater(1, self.ctrl_label.SetFocus)
def __init__(self, parent, IDactivite=None, IDunite=None): wx.Dialog.__init__(self, parent, -1, name="DLG_Saisie_conso_autogen", style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX) self.parent = parent self.IDactivite = IDactivite self.IDunite = IDunite # Importation des unités self.listeUnites = self.ImportationUnites() # Conditions self.staticbox_conditions_staticbox = wx.StaticBox(self, -1, _(u"Conditions d'application")) self.ctrl_conditions = CTRL_Conditions(self, IDactivite=IDactivite, IDunite=IDunite) self.bouton_ajouter = wx.BitmapButton(self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Ajouter.png"), wx.BITMAP_TYPE_ANY)) 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)) # Paramètres de la consommation self.staticbox_parametres_staticbox = wx.StaticBox(self, -1, _(u"Paramètres de la consommation")) self.label_heure_debut = wx.StaticText(self, -1, _(u"Heure de début :")) self.radio_heure_debut_fixe = wx.RadioButton(self, -1, _(u"Fixe"), style=wx.RB_GROUP) self.ctrl_heure_debut = CTRL_Saisie_heure.Heure(self) self.radio_heure_debut_formule = wx.RadioButton(self, -1, _(u"Formule")) self.ctrl_heure_debut_formule = wx.TextCtrl(self, -1, u"") self.bouton_heure_debut_formule = wx.BitmapButton(self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Modifier.png"), wx.BITMAP_TYPE_ANY)) self.label_heure_fin = wx.StaticText(self, -1, _(u"Heure de fin :")) self.radio_heure_fin_fixe = wx.RadioButton(self, -1, _(u"Fixe"), style=wx.RB_GROUP) self.ctrl_heure_fin = CTRL_Saisie_heure.Heure(self) self.radio_heure_fin_formule = wx.RadioButton(self, -1, _(u"Formule")) self.ctrl_heure_fin_formule = wx.TextCtrl(self, -1, u"") self.ctrl_heure_fin_formule.SetMinSize((150, -1)) self.bouton_heure_fin_formule = wx.BitmapButton(self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Modifier.png"), wx.BITMAP_TYPE_ANY)) self.label_etat = wx.StaticText(self, -1, _(u"Etat :")) self.ctrl_etat = CTRL_Choix_etat(self) self.label_quantite = wx.StaticText(self, -1, _(u"Quantité :")) self.ctrl_quantite = wx.SpinCtrl(self, -1, "1", min=1, max=500, size=(80, -1)) self.label_etiquettes = wx.StaticText(self, -1, _(u"Etiquettes :")) self.ctrl_etiquettes = CTRL_Etiquettes.CTRL(self, listeActivites=[self.IDactivite,], activeMenu=False) self.ctrl_etiquettes.MAJ() # Boutons 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, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.ctrl_conditions.Ajouter, self.bouton_ajouter) self.Bind(wx.EVT_BUTTON, self.ctrl_conditions.Modifier, self.bouton_modifier) self.Bind(wx.EVT_BUTTON, self.ctrl_conditions.Supprimer, self.bouton_supprimer) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioHeureDebut, self.radio_heure_debut_fixe) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioHeureDebut, self.radio_heure_debut_formule) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioHeureFin, self.radio_heure_fin_fixe) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioHeureFin, self.radio_heure_fin_formule) self.Bind(wx.EVT_BUTTON, self.OnBoutonHeureDebutFormule, self.bouton_heure_debut_formule) self.Bind(wx.EVT_BUTTON, self.OnBoutonHeureFinFormule, self.bouton_heure_fin_formule) 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.OnBoutonAnnuler, self.bouton_annuler) # Init contrôle self.OnRadioHeureDebut(None) self.OnRadioHeureFin(None)
def __init__(self, parent, IDfamille=None, selectionIndividus=[], selectionTous=False): wx.Dialog.__init__(self, parent, -1, name="grille", style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX) self.parent = parent self.IDfamille = IDfamille # Adapte taille Police pour Linux from Utils import UTILS_Linux UTILS_Linux.AdaptePolice(self) self._mgr = aui.AuiManager() self._mgr.SetManagedWindow(self) self.SetTitle(_(u"Grille des consommations")) # Récupère les perspectives cfg = UTILS_Config.FichierConfig() self.userConfig = cfg.GetDictConfig() if self.userConfig.has_key("grille_perspectives") == True : self.perspectives = self.userConfig["grille_perspectives"] else: self.perspectives = [] if self.userConfig.has_key("grille_perspective_active") == True : self.perspective_active = self.userConfig["grille_perspective_active"] else: self.perspective_active = None # Création du notebook self.panel_grille = PanelGrille(self, "individu", self.IDfamille) self.dictActivites = self.panel_grille.grille.dictActivites self.dictIndividus = self.panel_grille.grille.dictIndividus self.dictGroupes = self.panel_grille.grille.dictGroupes self.listeSelectionIndividus = self.panel_grille.grille.listeSelectionIndividus # Création des panels amovibles self.panel_periode = CTRL_Grille_periode.CTRL(self) dictDonnees = UTILS_Config.GetParametre("dict_selection_periodes_activites") self.panel_periode.SetDictDonnees(dictDonnees) self._mgr.AddPane(self.panel_periode, aui.AuiPaneInfo(). Name("periode").Caption(_(u"Sélection de la période")). Top().Layer(1).BestSize(wx.Size(230,144)).Position(1).CloseButton(False).Fixed().MaximizeButton(False)) self.panel_individus = CTRL_Grille_individus.CTRL(self, self.IDfamille, self.dictIndividus, selectionIndividus, selectionTous) self._mgr.AddPane(self.panel_individus, aui.AuiPaneInfo(). Name("individus").Caption(_(u"Sélection des individus")). Top().Layer(1).BestSize(wx.Size(180,140)).Position(2).CloseButton(False).MaximizeButton(False).MinSize((10, 100))) self.panel_activites = CTRL_Grille_activite2.CTRL(self, self.dictIndividus, self.dictActivites, self.dictGroupes, self.listeSelectionIndividus) self._mgr.AddPane(self.panel_activites, aui.AuiPaneInfo(). Name("activites").Caption(_(u"Sélection des activités")). Top().Layer(1).Position(3).CloseButton(False).MaximizeButton(False).MinSize((160, 100))) self.panel_facturation = CTRL_Grille_facturation.CTRL(self) self._mgr.AddPane(self.panel_facturation, aui.AuiPaneInfo(). Name("facturation").Caption(_(u"Facturation")). Right().Layer(0).BestSize(wx.Size(275,140)).Position(3).CloseButton(False).MaximizeButton(False).MinSize((275, 100))) self.panel_etiquettes = CTRL_Etiquettes.CTRL(self, activeMenu=False, onCheck=self.panel_grille.grille.MAJ_affichage) self._mgr.AddPane(self.panel_etiquettes, aui.AuiPaneInfo(). Name("etiquettes").Caption(_(u"Etiquettes")). Right().Layer(0).Position(3).CloseButton(False).BestSize(wx.Size(275, 100)).MaximizeButton(False).MinSize((275, 100))) self.panel_forfaits = CTRL_Grille_forfaits.CTRL(self, grille=self.panel_grille.grille) self._mgr.AddPane(self.panel_forfaits, aui.AuiPaneInfo(). Name("forfaits").Caption(_(u"Forfaits crédits")). Right().Layer(0).Position(4).BestSize(wx.Size(275,140)).CloseButton(False).MaximizeButton(False).MinSize((275, 100))) self._mgr.GetPane("forfaits").dock_proportion = 50000 self.panel_commandes = Commandes(self) self._mgr.AddPane(self.panel_commandes, aui.AuiPaneInfo(). Name("commandes").Caption(_(u"Commandes")). Bottom().Layer(0).CaptionVisible(False).CloseButton(False).MaximizeButton(False).MinSize((-1, 50))) self.panel_legende = OL_Legende_grille.ListView(self, id=-1, name="OL_legende", style=wx.LC_REPORT|wx.LC_NO_HEADER | wx.SUNKEN_BORDER|wx.LC_SINGLE_SEL) self._mgr.AddPane(self.panel_legende, aui.AuiPaneInfo(). Name("legende").Caption(_(u"Légende")). Left().Layer(0).Position(2).CloseButton(False).BestSize(wx.Size(170, 100)).MaximizeButton(False).MinSize((170, 100))) self._mgr.GetPane("legende").dock_proportion = 60000 self.panel_raccourcis = OL_Raccourcis_grille.ListView(self, id=-1, name="OL_raccourcis", style=wx.LC_REPORT|wx.LC_NO_HEADER | wx.SUNKEN_BORDER|wx.LC_SINGLE_SEL) self._mgr.AddPane(self.panel_raccourcis, aui.AuiPaneInfo(). Name("raccourcis").Caption(_(u"Touches raccourcis")). Left().Layer(0).Position(2).CloseButton(False).BestSize(wx.Size(170, 100)).MaximizeButton(False).MinSize((170, 100))) self._mgr.GetPane("raccourcis").dock_proportion = 30000 # Création du panel central self._mgr.AddPane(self.panel_grille, aui.AuiPaneInfo().Name("grille"). CenterPane()) self._mgr.GetPane("grille").Show() # Sauvegarde de la perspective par défaut self.perspective_defaut = self._mgr.SavePerspective() # Récupération de la perspective chargée if self.perspective_active != None : self._mgr.LoadPerspective(self.perspectives[self.perspective_active]["perspective"]) else: self._mgr.LoadPerspective(self.perspective_defaut) self._mgr.Update() self.Bind(wx.EVT_CLOSE, self.OnClose) # Détermine la taille de la fenêtre self.SetMinSize((600, 670)) taille_fenetre = UTILS_Config.GetParametre("taille_fenetre_grille") if taille_fenetre == None : self.SetSize((900, 670)) if taille_fenetre == (0, 0) : self.Maximize(True) else: self.SetSize(taille_fenetre) self.CenterOnScreen() # Initialisation des contrôles self.panel_periode.SetVisibleSelection() self.SetListesPeriodes(self.panel_periode.GetDatesSelections()) self.SetListeSelectionIndividus(self.panel_individus.GetSelections()) self.SetListeSelectionActivites(self.panel_activites.ctrl_activites.GetIDcoches()) self.MAJ_grille() # Affichage du panneau du panneau Forfait Credits if self.panel_grille.grille.tarifsForfaitsCreditsPresents == True : self._mgr.GetPane("forfaits").Show() else: self._mgr.GetPane("forfaits").Hide() # Affichage du panneau du panneau Etiquettes if self.panel_grille.grille.afficherListeEtiquettes == True : self._mgr.GetPane("etiquettes").Show() else: self._mgr.GetPane("etiquettes").Hide() # Contre le bug de maximize wx.CallAfter(self._mgr.Update) wx.CallAfter(self.panel_grille.grille.SetFocus)
def __init__(self, parent, IDactivite=None, nouvelleActivite=False): wx.Panel.__init__(self, parent, id=-1, name="panel_etiquettes", style=wx.TAB_TRAVERSAL) self.parent = parent self.IDactivite = IDactivite self.staticbox_groupes_staticbox = wx.StaticBox( self, -1, _(u"Etiquettes de consommations")) self.ctrl_etiquettes = CTRL_Etiquettes.CTRL(self, listeActivites=[ IDactivite, ], nomActivite=u"Activité") self.ctrl_etiquettes.MAJ() self.bouton_ajouter = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Ajouter.png"), wx.BITMAP_TYPE_ANY)) 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_monter = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Fleche_haut.png"), wx.BITMAP_TYPE_ANY)) self.bouton_descendre = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Fleche_bas.png"), wx.BITMAP_TYPE_ANY)) self.bouton_trier = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Tri_za.png"), wx.BITMAP_TYPE_ANY)) self.label_info = wx.StaticText( self, -1, _(u"Les étiquettes sont optionnelles. Elles servent à associer à des consommations des actions, des intervenants, des salles, des états, etc..." )) self.label_info.SetFont( wx.Font(7, wx.SWISS, wx.NORMAL, wx.NORMAL, False)) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.ctrl_etiquettes.Ajouter, self.bouton_ajouter) self.Bind(wx.EVT_BUTTON, self.ctrl_etiquettes.Modifier, self.bouton_modifier) self.Bind(wx.EVT_BUTTON, self.ctrl_etiquettes.Supprimer, self.bouton_supprimer) self.Bind(wx.EVT_BUTTON, self.ctrl_etiquettes.Monter, self.bouton_monter) self.Bind(wx.EVT_BUTTON, self.ctrl_etiquettes.Descendre, self.bouton_descendre)
def __init__(self, parent, IDactivite=None, IDunite_remplissage=None): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE) self.parent = parent self.IDactivite = IDactivite self.IDunite_remplissage = IDunite_remplissage # Nom self.staticbox_nom_staticbox = wx.StaticBox(self, -1, _(u"Nom de l'unité")) self.label_nom = wx.StaticText(self, -1, _(u"Nom complet :")) self.ctrl_nom = wx.TextCtrl(self, -1, u"") self.ctrl_nom.SetMinSize((300, -1)) self.label_abrege = wx.StaticText(self, -1, _(u"Nom abrégé :")) self.ctrl_abrege = wx.TextCtrl(self, -1, u"") # Caractéristiques self.staticbox_caract_staticbox = wx.StaticBox(self, -1, _(u"Caractéristiques")) self.label_seuil = wx.StaticText(self, -1, _(u"Seuil d'alerte :")) self.ctrl_seuil = wx.SpinCtrl(self, -1, "5", size=(60, -1)) self.ctrl_seuil.SetRange(0, 200) self.label_unites = wx.StaticText(self, -1, _(u"Unités :")) self.ctrl_unites = CheckListBoxUnites(self, self.IDactivite, self.IDunite_remplissage) self.ctrl_unites.SetMinSize((-1, 100)) self.ctrl_unites.MAJ() self.label_etiquettes = wx.StaticText(self, -1, _(u"Etiquettes :")) self.ctrl_etiquettes = CTRL_Etiquettes.CTRL(self, listeActivites=[ self.IDactivite, ], nomActivite=u"Activité", activeMenu=False) self.ctrl_etiquettes.SetMinSize((-1, 80)) self.ctrl_etiquettes.MAJ() self.label_horaire = wx.StaticText(self, -1, _(u"Plage horaire :")) self.label_de = wx.StaticText(self, -1, _(u"de")) self.ctrl_heure_min = CTRL_Saisie_heure.Heure(self) self.label_a = wx.StaticText(self, -1, u"à") self.ctrl_heure_max = CTRL_Saisie_heure.Heure(self) self.label_affichage = wx.StaticText(self, -1, _(u"Affichage :")) self.check_afficher_page_accueil = wx.CheckBox( self, -1, _(u"Effectifs de la page d'accueil")) self.check_afficher_page_accueil.SetValue(True) self.check_afficher_grille_conso = wx.CheckBox( self, -1, _(u"Grille des consommations")) self.check_afficher_grille_conso.SetValue(True) # Validité self.staticbox_validite_staticbox = wx.StaticBox( self, -1, _(u"Validité")) self.radio_illimitee = wx.RadioButton( self, -1, _(u"Durant la période de validité de l'activité"), style=wx.RB_GROUP) self.radio_limitee = wx.RadioButton(self, -1, u"Du") self.ctrl_date_debut = CTRL_Saisie_date.Date(self) self.label_au = wx.StaticText(self, -1, _(u"au")) self.ctrl_date_fin = CTRL_Saisie_date.Date(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_RADIOBUTTON, self.OnRadioValidite, self.radio_illimitee) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioValidite, self.radio_limitee) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide) self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) if self.IDunite_remplissage != None: self.Importation() self.OnRadioValidite(None)
def __init__(self, parent): wx.Dialog.__init__(self, parent, -1, name="DLG_Gestionnaire_conso", style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME) self.parent = parent self._mgr = aui.AuiManager() self._mgr.SetManagedWindow(self) # Détermine la taille de la fenêtre self.SetMinSize((700, 600)) taille_fenetre = UTILS_Config.GetParametre("taille_fenetre_tableau_presences") if taille_fenetre == None : self.SetSize((900, 600)) if taille_fenetre == (0, 0) : self.Maximize(True) else: self.SetSize(taille_fenetre) self.CenterOnScreen() # Récupère les perspectives cfg = UTILS_Config.FichierConfig() self.userConfig = cfg.GetDictConfig() if self.userConfig.has_key("gestionnaire_perspectives") == True : self.perspectives = self.userConfig["gestionnaire_perspectives"] else: self.perspectives = [] if self.userConfig.has_key("gestionnaire_perspective_active") == True : self.perspective_active = self.userConfig["gestionnaire_perspective_active"] else: self.perspective_active = None # Création du notebook self.panel_grille = PanelGrille(self) self.dictActivites = self.panel_grille.grille.dictActivites self.dictIndividus = self.panel_grille.grille.dictIndividus self.dictGroupes = self.panel_grille.grille.dictGroupes self.listeSelectionIndividus = self.panel_grille.grille.listeSelectionIndividus # Création des panels amovibles self.panel_commandes = Commandes(self) self._mgr.AddPane(self.panel_commandes, aui.AuiPaneInfo(). Name("commandes").Caption(_(u"Commandes")). Bottom().Layer(0).Position(1).CaptionVisible(False).CloseButton(False).MaximizeButton(False).MinSize((-1, 50))) self.panel_totaux = CTRL_Grille_totaux.CTRL(self, grille=self.panel_grille.grille) self._mgr.AddPane(self.panel_totaux, aui.AuiPaneInfo(). Name("totaux").Caption(_(u"Totaux")). Bottom().Layer(0).Position(0).Row(1).CloseButton(False).MaximizeButton(False).MinSize((160, 100))) self.panel_calendrier = CTRL_Grille_calendrier.CTRL(self) self._mgr.AddPane(self.panel_calendrier, aui.AuiPaneInfo(). Name("calendrier").Caption(_(u"Sélection de la date")). Left().Layer(1).BestSize(wx.Size(195, 180)).Position(1).CloseButton(False).Fixed().MaximizeButton(False)) self.panel_activites = CTRL_Grille_activite3.CTRL(self) self._mgr.AddPane(self.panel_activites, aui.AuiPaneInfo(). Name("activites").Caption(_(u"Sélection des activités")). Left().Layer(1).Position(1).CloseButton(False).MaximizeButton(False).BestSize(wx.Size(-1,50))) pi = self._mgr.GetPane("activites") pi.dock_proportion = 100000 # Proportion self.panel_legende = OL_Legende_grille.ListView(self, id=-1, name="OL_legende", style=wx.LC_REPORT|wx.LC_NO_HEADER | wx.SUNKEN_BORDER|wx.LC_SINGLE_SEL) self.panel_legende.SetSize((50, 50)) self._mgr.AddPane(self.panel_legende, aui.AuiPaneInfo(). Name("legende").Caption(_(u"Légende")). Left().Layer(1).Position(2).CloseButton(False).MaximizeButton(False).MinSize((160, 100)).MaxSize((-1, 120)) ) self.panel_raccourcis = OL_Raccourcis_grille.ListView(self, id=-1, name="OL_raccourcis", style=wx.LC_REPORT|wx.LC_NO_HEADER | wx.SUNKEN_BORDER|wx.LC_SINGLE_SEL) self.panel_raccourcis.SetSize((50, 50)) self._mgr.AddPane(self.panel_raccourcis, aui.AuiPaneInfo(). Name("raccourcis").Caption(_(u"Touches raccourcis")). Left().Layer(1).Position(3).CloseButton(False).MaximizeButton(False).MinSize((160, 100)).MaxSize((-1, 120)) ) self._mgr.GetPane("raccourcis").dock_proportion = 60000 self.panel_etiquettes = CTRL_Etiquettes.CTRL(self, activeMenu=False) self._mgr.AddPane(self.panel_etiquettes, aui.AuiPaneInfo(). Name("etiquettes").Caption(_(u"Etiquettes")). Right().Layer(0).Position(0).CloseButton(False).BestSize(wx.Size(275, 100)).MaximizeButton(False).MinSize((275, 100))) self._mgr.GetPane("etiquettes").Hide() self.panel_forfaits = CTRL_Grille_forfaits.CTRL(self, grille=self.panel_grille.grille) self._mgr.AddPane(self.panel_forfaits, aui.AuiPaneInfo(). Name("forfaits").Caption(_(u"Forfaits crédits")). Right().Layer(0).Position(1).BestSize(wx.Size(275,140)).Position(4).CloseButton(False).MaximizeButton(False).MinSize((275, 100))) self._mgr.GetPane("forfaits").Hide() # Création du panel central self._mgr.AddPane(self.panel_grille, aui.AuiPaneInfo().Name("grille"). CenterPane()) self._mgr.GetPane("grille").Show() # Sauvegarde de la perspective par défaut self.perspective_defaut = self._mgr.SavePerspective() # Récupération de la perspective chargée if self.perspective_active != None : self._mgr.LoadPerspective(self.perspectives[self.perspective_active]["perspective"]) else: self._mgr.LoadPerspective(self.perspective_defaut) # Affichage du panneau du panneau Forfait Credits if self.panel_grille.grille.tarifsForfaitsCreditsPresents == True : self._mgr.GetPane("forfaits").Show() else: self._mgr.GetPane("forfaits").Hide() # Affichage du panneau du panneau Etiquettes if self.panel_grille.grille.afficherListeEtiquettes == True : self._mgr.GetPane("etiquettes").Show() else: self._mgr.GetPane("etiquettes").Hide() self._mgr.Update() self.SetTitle(_(u"Gestionnaire des consommations")) self.Bind(wx.EVT_CLOSE, self.OnClose) # Initialisation des contrôles date = self.panel_calendrier.GetDate() ## self.SetDate(date) # Init self.panel_activites.SetCocherParDefaut(UTILS_Config.GetParametre("gestionnaire_conso_cocher_activites", defaut=True)) # Affichage du panneau du panneau Forfait Credits ## if self.panel_grille.grille.tarifsForfaitsCreditsPresents == True : ## self._mgr.GetPane("forfaits").Show() ## else: ## self._mgr.GetPane("forfaits").Hide() ## self._mgr.Update() # Contre le bug de maximize wx.CallAfter(self._mgr.Update)