def draw(tab_arrive,temps_file,temp_system):
    dictio={}
    j=0
    for i in range(len(tab_arrive)):
        dictio2={}
        dictio2["t_arrive"]='{:.4f}'.format(tab_arrive[i])
        dictio2["t_file"]='{:.4f}'.format(temps_file[i])
        dictio2["t_service"]='{:.4f}'.format(tab_arrive[i]+temps_file[i])
        dictio2["t_depart"]='{:.4f}'.format(tab_arrive[i]+temp_system[i])
        j=i+1
        dictio[j]=dictio2


    master = Tk()

    tframe = Frame(master)
    tframe.pack()
    table = TableCanvas(tframe)

    table = TableCanvas(tframe, data=dictio)

    model = table.model
    model.importDict(dictio)
    table.sortTable(columnName="t_arrive")
    table.show()
    master.mainloop()
def _frame2():
    frame.destroy()
    frame2 = tk.Tk()
    frame2.title('Frame2')
    frame2.geometry('1000x300')
    tframe = Frame(frame2)
    tframe.pack()
    datafrommssql()
    table = TableCanvas(tframe,
                        editable=False,
                        read_only=True,
                        rows=5,
                        cols=5,
                        height=110,
                        width=939)
    table.importCSV('test.csv')
    Entry(frame2, text='', textvariable=id1).pack()
    Button(frame2, text="Buy car", command=buy).pack()
    table.show()
Beispiel #3
0
                       command=lambda: search(trend_text, noOfTweets_text, saveFile_text.get(1.0, 'end'), progress))
search_button.place(relx=move_x+0.61, rely=0.3, relwidth=0.15, relheight=0.05)

progress = ttk.Progressbar(canvas, length=100, orient=HORIZONTAL, mode='determinate')
progress.place(relx=move_x+0.45, rely=0.38, relwidth=0.5, anchor='n')

show_button = Button(canvas, text='Show Tweets', font='Helvetica 20 bold', command=lambda: show_tweets(saveFile_text.get(1.0, 'end')))
show_button.place(relx=move_x+0.3, rely=0.42, relwidth=0.15, relheight=0.05, anchor='n')

reset_button = Button(canvas, text='Reset', font='Helvetica 20 bold', command=lambda: reset())
reset_button.place(relx=move_x+0.6, rely=0.42, relwidth=0.15, relheight=0.05, anchor='n')


frame = Frame(canvas, bd=10, bg='#ececec')
frame.config(highlightbackground="red", highlightcolor="red")

model = TableModel()
frame.place(relx=0.1, rely=0.5, relwidth=0.8, relheight=0.45)
Table = TableCanvas(frame, model=model, cols=3, thefont=('Helvetica', 13),
                    rows=Total_Tweets, rowheight=50, rowselectedcolor='#ececec',
                    cellbackgr='#ececec', read_only=False)
Table.show()
#Table.place(relx=0.06, rely=0.06, relwidth=0.94, relheight=0.94)



root.mainloop()

if __name__ == "__main__":
    pass