I’m working on a project were I want to load data from a MySQL database and display it in a PyGTK application for easy overview and configuration. My goal is for the program to automaticly add new rows depending on the database contents, ie. if I add a new command to the database, I should not need to make any changes to my GTK-application.
This is my testing database:
+----+----------+---------+----+--------+
| id | name | enabled | op | desc |
+----+----------+---------+----+--------+
| 1 | !help | 1 | 0 | blabla |
| 2 | !version | 1 | 1 | blabla |
| 3 | !tp | 0 | 1 | blabla |
+----+----------+---------+----+--------+
And I would like to (dynamicly) create a GTK-application that looks something like this:
https://i.stack.imgur.com/CNjiB.png
I’ve some experience working with python before but not so much GTK, and I’m not sure how to approach this problem. Could someone give me a working example?
Regards Oscar
You could try this. I’ll leave you to fill in the details, like the MySQL stuff. The important part here, to make the widgets look evenly spaced is the parameter
otherwise they will be all over the place, only taking up as much room as they require to display themselves.
Hope this is what you’re after.