ohai.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A cozy, fast and secure Mastodon server where everyone is welcome. Run by the folks at ohai.is.

Administered by:

Server stats:

1.8K
active users

#treeview

0 posts0 participants0 posts today

So, lately I've tried my hand at a GUI application in #Python -- to keep dependencies to an absolute minimum, I chose to use #Tkinter.

One of the other WICEN members (who prefers VisualBASIC 6) calls it "T-stinker"… man… not far from the case. Tkinter has a rather idiosyncratic API to say the least!

I say this having previously written GUIs in #Java #Swing, #Qt, #WxWidgets, #CARealizerBASIC and #VisualBASIC. Tkinter really is archaic!

Anyway, my big nemesis has been getting tkinter.ttk.Treeview tamed.

#Treeview has a lot of functionality, but it's a major headache to manage. I'm not 100% sold on the result just yet, but it's a big improvement on bare Treeview I think.

gist.github.com/sjlongland/f9b is my wrapper.

GistSimplified table widget using tkinter.ttk.TreeviewSimplified table widget using tkinter.ttk.Treeview - table.py

Do any of you nerds know #Microsoft #Access well? It appears that the #TreeView control has gone through some changes, so online documentation is largely useless. I want to implement a very simple idea with no discernible solution: Select a node to retrieve the node's Key. Not text or index. The Key contains the unique ID for a table's row, which I can use to navigate to a record.

I can use a series of three list boxes to create the same functionality, but that takes up a ton of real estate.