Adjust columns in Tkinter Table

Asked

Viewed 17 times

-1

I’m using Tkinter in Python, and also using Table.

In my code I have a line, as follows:

table = Table (frame, dataframe=frame_input['id', 'name', 'usando_limit', 'telephone']], width = (width - 100), height = (height - 50), showtoolbar=False, showstatusbar=False)

However, when I run the code, some table columns that appear in the computer display do not show the full text, for example, the column 'name' cuts the full names of some clients (you can see only the beginning of the names, not the full name. How do I automatically (or even manually) adjust the width of the columns to the cell contents?

2 answers

0

You are positioned the Table element in a frame, you have to see how you are positioning this Frame, you are using the . grid() or . pack(), with grid you have to specify the position of the elements as if they were in a tab ( Row and column) however pack simply puts the element in a new root Riga I hope I was clear

  • I just need to adjust the width of the column to the width of the contents of the cells in the spreadsheet, I haven’t been able to do or found anything about.

  • @Ricardo you can edit the question by showing the full code?

0

Yes, I am the grid. The table is displaying normally on the screen, with all the fields correctly. I just need to adjust the width of some columns that are 'cutting' the displayed data, like the 'name' column. I just want to adjust the column to the cell content...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.