add clear input
This commit is contained in:
52
ts.py
Normal file
52
ts.py
Normal file
@@ -0,0 +1,52 @@
|
||||
from tkinter import *
|
||||
from tkinter import ttk
|
||||
|
||||
|
||||
ws = Tk()
|
||||
ws.title('PythonGuides')
|
||||
ws.geometry('500x500')
|
||||
ws['bg'] = '#AC99F2'
|
||||
|
||||
game_frame = Frame(ws)
|
||||
game_frame.pack()
|
||||
|
||||
my_game = ttk.Treeview(game_frame)
|
||||
|
||||
my_game['columns'] = {'player_id':'1',
|
||||
'player_name': '2',
|
||||
'player_Rank':'3',
|
||||
'player_states':'4',
|
||||
'player_city':'5'}
|
||||
|
||||
|
||||
|
||||
for key, value in my_game['columns'].items():
|
||||
print(key)
|
||||
my_game.column(key,anchor=CENTER, width=80)
|
||||
|
||||
|
||||
""""
|
||||
my_game.heading("#0",text="",anchor=CENTER)
|
||||
my_game.heading("player_id",text="Id",anchor=CENTER)
|
||||
my_game.heading("player_name",text="Name",anchor=CENTER)
|
||||
my_game.heading("player_Rank",text="Rank",anchor=CENTER)
|
||||
my_game.heading("player_states",text="States",anchor=CENTER)
|
||||
my_game.heading("player_city",text="States",anchor=CENTER)
|
||||
|
||||
my_game.insert(parent='',index='end',iid=0,text='',
|
||||
values=('1','Ninja','101','Oklahoma', 'Moore'))
|
||||
my_game.insert(parent='',index='end',iid=1,text='',
|
||||
values=('2','Ranger','102','Wisconsin', 'Green Bay'))
|
||||
my_game.insert(parent='',index='end',iid=2,text='',
|
||||
values=('3','Deamon','103', 'California', 'Placentia'))
|
||||
my_game.insert(parent='',index='end',iid=3,text='',
|
||||
values=('4','Dragon','104','New York' , 'White Plains'))
|
||||
my_game.insert(parent='',index='end',iid=4,text='',
|
||||
values=('5','CrissCross','105','California', 'San Diego'))
|
||||
my_game.insert(parent='',index='end',iid=5,text='',
|
||||
values=('6','ZaqueriBlack','106','Wisconsin' , 'TONY'))
|
||||
|
||||
my_game.pack()
|
||||
"""
|
||||
|
||||
ws.mainloop()
|
||||
Reference in New Issue
Block a user