Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I defined a TreeView in glade, how do I manipulate its columns and other properties?

0
Posted

I defined a TreeView in glade, how do I manipulate its columns and other properties?

0

Glade’s support for TreeView is somewhat limited: you can only define a “blank” treeview. You must create the columns and (optionally) set other properties entirely in Python code. What glade can do is assign a model to it, define the model’s columns and populate them. Note that you get hold of your glade-defined treeview using get_object(“treeview1”) as you would for any other widget in the glade widget tree. Similarly, if you attached a model to it, you can get it via get_object(“model”), or similar code. From there on you can use treeview API to add columns, work on its model, and manipulate its configuration.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.