@ -44,7 +44,7 @@ class Gui:
self . root . title ( ' BasketBall Analitycs® ' )
self . canvas = tkinter . Canvas ( self . root , width = self . terrain . width , height = self . terrain . height , background = ' #bbb ' )
self . start_frame = tkinter . Frame ( self . root , width = self . terrain . width , height = self . terrain . height , bg = ' red ' )
self . start_frame = tkinter . Frame ( self . root , width = self . terrain . width , height = self . terrain . height , bg = ' #bbb ' )
self . start_button_new = tkinter . Button ( self . start_frame , text = ' new ' , command = self . new )
self . start_button_open = tkinter . Button ( self . start_frame , text = ' open ' , command = self . browse_open )
@ -58,7 +58,7 @@ class Gui:
self . filemenu . add_command ( label = " new " , command = self . new )
self . filemenu . add_command ( label = " open " , command = self . browse_open )
self . filemenu . add_separator ( )
self . filemenu . add_command ( label = " exit " , command = self . root . quit )
self . filemenu . add_command ( label = " exit " , command = quit )
self . menubar . add_cascade ( label = " file " , menu = self . filemenu )
self . action_to_show = [ ]
@ -124,7 +124,7 @@ class Gui:
def browse_open ( self , * event ) :
# ouvre un fichier
path = tkinter . filedialog . askopenfilename ( initialdir = " ~/Documents/python/basket " , title = " Select a File " , filetypes = ( ( " BasketBall Match " , " *.bbm " ) , ( " all files " , " *.* " ) ) )
path = tkinter . filedialog . askopenfilename ( initialdir = " ~/Documents " , title = " Select a File " , filetypes = ( ( " BasketBall Match " , " *.bbm " ) , ( " all files " , " *.* " ) ) )
if len ( path ) != 0 :
self . file = File ( path )
self . file . read_file ( )