Hi, I want add a list in my C program...I know how build a list with GTK+, add string at opened program, etc...but it's different when you want "maintain" the content of list. I thought to save the content in a .txt file (I've two column, 1st contains a string type and 2nd contains int type), but when I open the program, how can I import .txt file's content in the list?
I thought to separate string type and int type with a space, load .txt file's content in a vector, insert string type in a vector, int type in another vector and assign the values of vector with string type to 1st column and values of vector with int type to 2nd column.
But I see this as a bad idea.
Some good idea?
views:
25answers:
1
A:
When you're reading records from the .txt file, you should insert the values in a GtkListStore, then GtkTreeView is used to display the result from the GtkListStore.
PC2st
2010-08-22 23:31:47
But how can I share values in the appropriate columns with a good method?I'm thinking of using SQLite.
stdio
2010-08-24 22:02:25