1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
| #! /usr/bin/env python
# -*- coding: utf8 -*-
#
# GUI module generated by PAGE version 4.12
# In conjunction with Tcl version 8.6
import sys
try:
from Tkinter import *
except ImportError:
from tkinter import *
try:
import ttk
py3 = False
except ImportError:
import tkinter.ttk as ttk
py3 = True
import calendar
import tkMessageBox
import Etape3_support
#import calendrier.ttkcalendar as cal
import ttkcalendar as cal
def vp_start_gui():
'''Starting point when module is the main routine.'''
global val, w, root
root = Tk()
Etape3_support.set_Tk_var()
top = Information_du_renouvellement (root)
Etape3_support.init(root, top)
root.mainloop()
w = None
def create_Information_du_renouvellement(root, *args, **kwargs):
'''Starting point when module is imported by another program.'''
global w, w_win, rt
rt = root
w = Toplevel (root)
Etape3_support.set_Tk_var()
top = Information_du_renouvellement (w)
Etape3_support.init(w, top, *args, **kwargs)
return (w, top)
def view_calendar():
import sys
ttkcal = cal.Calendar(firstweekday=calendar.SUNDAY)
print "blalabllb %s" %Etape3_support.date
ttkcal.pack()
if 'win' not in sys.platform:
style = ttk.Style()
style.theme_use('clam')
##def call_etape5():
## Etape5.vp_start_gui()
class Information_du_renouvellement:
def __init__(self, top=None):
'''This class configures and populates the toplevel window.
top is the toplevel containing window.'''
_bgcolor = '#d9d9d9' # X11 color: 'gray85'
_fgcolor = '#000000' # X11 color: 'black'
_compcolor = '#d9d9d9' # X11 color: 'gray85'
_ana1color = '#d9d9d9' # X11 color: 'gray85'
_ana2color = '#d9d9d9' # X11 color: 'gray85'
top.geometry("808x468")
top.title("Information du renouvellement")
top.configure(background="#d9d9d9")
top.configure(highlightbackground="#d9d9d9")
top.configure(highlightcolor="black")
self.Labelframedateheure = LabelFrame(top)
self.Labelframedateheure.place(relx=0.01, rely=0.3, relheight=0.22
, relwidth=0.66)
self.Labelframedateheure.configure(relief=GROOVE)
self.Labelframedateheure.configure(foreground="black")
self.Labelframedateheure.configure(text='''Date/heures du renouvellement''')
self.Labelframedateheure.configure(background="#d9d9d9")
self.Labelframedateheure.configure(highlightbackground="#d9d9d9")
self.Labelframedateheure.configure(highlightcolor="black")
self.Labelframedateheure.configure(width=530)
self.Labeldate = Label(self.Labelframedateheure)
self.Labeldate.place(relx=0.04, rely=0.19, height=21, width=124, y=-12)
self.Labeldate.configure(activebackground="#f9f9f9")
self.Labeldate.configure(activeforeground="black")
self.Labeldate.configure(background="#d9d9d9")
self.Labeldate.configure(disabledforeground="#a3a3a3")
self.Labeldate.configure(foreground="#000000")
self.Labeldate.configure(highlightbackground="#d9d9d9")
self.Labeldate.configure(highlightcolor="black")
self.Labeldate.configure(text='''Date du renouvellement''')
self.Labeldate = Label(self.Labelframedateheure)
self.Labeldate.place(relx=0.06, rely=0.48,height=30, relwidth=0.38)
self.Labeldate.configure(textvariable=Etape3_support.date)
self.right = Button(self.Labeldate, text='>', command=view_calendar)
self.right.place(relx=0.90, rely=0.001,height=30, relwidth=0.10)
if __name__ == '__main__':
vp_start_gui() |
Partager