Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 52a3abc

Browse files
player data allignment fix
1 parent 451308a commit 52a3abc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

‎IPL Statistics GUI/ipl.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,16 @@ def scrape_results():
4949
for player in table_data[:51]:
5050
single_record = ""
5151
for cell in player:
52-
format_cell = "{:<40}"
53-
single_record += format_cell.format(cell[:40])
52+
format_cell = "{:<20}"
53+
single_record += format_cell.format(cell[:20])
5454
single_record += "\n"
5555
p_records += single_record
5656

5757
# Adding the formatted data into tkinter GUI
58-
query_label['text'] = p_records
58+
query_label.config(state=tk.NORMAL)
59+
query_label.delete(1.0,"end")
60+
query_label.insert(1.0,p_records)
61+
query_label.config(state=tk.DISABLED)
5962

6063

6164
# Creating tkinter window
@@ -99,8 +102,7 @@ def scrape_results():
99102
frame = ttk.Frame(window)
100103
frame.place(relx=0.50, rely=0.12, relwidth=0.98, relheight=0.90, anchor="n")
101104

102-
query_label = ttk.Label(
103-
frame, anchor="nw", justify="left", text="")
105+
query_label = tk.Text( frame,height="52",width="500")
104106
query_label.grid(row=7, columnspan=2)
105107

106108
window.mainloop()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /