简体   繁体   中英

PyGObject. Python with GTK. TreeView problem

I am trying to make a multiple rows in a treeview in Python 3 using GTK3+ . In each row you will have multiple buttons and Toggleswitches and so on. It will be something as shown below. I've tried to find examples but never succeded to find anything that satisfies my needs.

在此处输入图片说明

Each time you click on + button a new similar row should appear and be added. And every buttons 1-4 should do different things. For instance in row 1 we try to download a file by clicking Button 4 (the one to the right- sorry misspelled in the picture). This should not interfear with other Button 4s in other rows.

So the main question is how I make such row using GTK . and How do I generate similar rows in the tree view. I would appriciate any links that deal with buttons in treeviews or images in treeviews.

You should use a GtkListBox . Here's an example .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM