Re: Tkinter: multicolumn table widget
On Tue, 31 May 2022, MRAB wrote: There's an example of how to show a tooltip here: https://stackoverflow.com/questions/3221956/how-do-i-display-tooltips-in-tkinter MRAB, A tooltip would work. I downloaded the first example and assume that it will display a treeview cell when the cursor hovers over it without needing to be limited to a single column. When I test the module (I'm still writing it) I'll learn what needs fixing. Thanks very much, Rich -- https://mail.python.org/mailman/listinfo/python-list
Re: Tkinter: multicolumn table widget
On Tue, 31 May 2022, MRAB wrote: The note could be displayed partially in the column itself, with the full text displayed either in read-only textbox nearby when the row is selected (and it's the only selected row), or in the form of a tooltip when you hover over it. There's an example of how to show a tooltip here: https://stackoverflow.com/questions/3221956/how-do-i-display-tooltips-in-tkinter MRAB, Thank you very much. I've been reading about the TreeView and learning how to use it. Displaying the text column in a read-only textbox or tooltip would certainly do the job. Best regards, Rich -- https://mail.python.org/mailman/listinfo/python-list
Re: Tkinter: multicolumn table widget
On 2022-05-31 21:29, Rich Shepard wrote: On Tue, 31 May 2022, MRAB wrote: Have a look at the tkinter.ttk.Treeview widget; it can be formatted as a tree hierarchy, its name suggests, or a multi-column tables, but it doesn't support multi-line text though, as far as I know. MRAB, Thank you, I will. Each time I add a row to the contacts database table I include a note of what was discussed and what needs to be done. I'd like to be able to see the entire note with each contact event. I'm not committed to using a table so I'm totally open to other approaches. My needs are few: - The returned results are read-only. - The number of rows returned are variable. - Each row has a contact date, contact type, note, and next contact date. The last one isn't necessary to be displayed, but the first three are. - I want to be able to scroll and view all returned rows. The note could be displayed partially in the column itself, with the full text displayed either in read-only textbox nearby when the row is selected (and it's the only selected row), or in the form of a tooltip when you hover over it. There's an example of how to show a tooltip here: https://stackoverflow.com/questions/3221956/how-do-i-display-tooltips-in-tkinter As with the tkinter.Text widget, you'll need to add the scrollbar(s) separately and then link them. This I expected. -- https://mail.python.org/mailman/listinfo/python-list
Re: Tkinter: multicolumn table widget
On Tue, 31 May 2022, MRAB wrote: Have a look at the tkinter.ttk.Treeview widget; it can be formatted as a tree hierarchy, its name suggests, or a multi-column tables, but it doesn't support multi-line text though, as far as I know. MRAB, Thank you, I will. Each time I add a row to the contacts database table I include a note of what was discussed and what needs to be done. I'd like to be able to see the entire note with each contact event. I'm not committed to using a table so I'm totally open to other approaches. My needs are few: - The returned results are read-only. - The number of rows returned are variable. - Each row has a contact date, contact type, note, and next contact date. The last one isn't necessary to be displayed, but the first three are. - I want to be able to scroll and view all returned rows. As with the tkinter.Text widget, you'll need to add the scrollbar(s) separately and then link them. This I expected. Thanks, Rich -- https://mail.python.org/mailman/listinfo/python-list
Re: Tkinter: multicolumn table widget
On 2022-05-31 19:47, Rich Shepard wrote: My web searches haven't helped me learn how to design a read-only scrollable table widget displaying rows retrieved from postgres database tables. This is for my business development application. I'm writing a view module that displays my contact history with a named person. The person's last and first name are passed to the database tables and all the results are displayed in a read-only view. The view has three vertical sections: person information on top, contact methods (phones, email) below that, and a scrollable, multicolumn table at the bottom. The table columns consist of three tk.StringVal() and one tk.Text() which usually has multiple rows related to that contact event. I want to learn how to create the table so each row has the contents of each of the four columns and I can scroll down and up to look at the history. All help is certainly appreciated. Have a look at the tkinter.ttk.Treeview widget; it can be formatted as a tree hierarchy, its name suggests, or a multi-column tables, but it doesn't support multi-line text though, as far as I know. As with the tkinter.Text widget, you'll need to add the scrollbar(s) separately and then link them. -- https://mail.python.org/mailman/listinfo/python-list
Tkinter: multicolumn table widget
My web searches haven't helped me learn how to design a read-only scrollable table widget displaying rows retrieved from postgres database tables. This is for my business development application. I'm writing a view module that displays my contact history with a named person. The person's last and first name are passed to the database tables and all the results are displayed in a read-only view. The view has three vertical sections: person information on top, contact methods (phones, email) below that, and a scrollable, multicolumn table at the bottom. The table columns consist of three tk.StringVal() and one tk.Text() which usually has multiple rows related to that contact event. I want to learn how to create the table so each row has the contents of each of the four columns and I can scroll down and up to look at the history. All help is certainly appreciated. Rich -- https://mail.python.org/mailman/listinfo/python-list