Re: Unknown number of columns in a GtkListStore



Razvan Gavril <razvan gavril gmail com> writes:

I want to display the results of a user entered sql query in a GtkTreeView 
(List). The only problem that i have is the the number of columns in the 
list is only known at runtime (no of cols returned by sql query). How can i 
create a GtkListStore with a dynamic number of columns ?

Doesn't this meet your needs?

http://developer.gnome.org/doc/API/2.0/gtk/GtkListStore.html#gtk-list-store-newv

(begin-quote)

GtkListStore* gtk_list_store_newv           (gint n_columns,
                                             GType *types);

Non-vararg creation function. Used primarily by language bindings.

n_columns :     number of columns in the list store
types :         an array of GType types for the columns, from first to last
Returns :       a new GtkListStore

(end-quote)


Rgds,
anna

-- 

Open Movie: Not only will the project be realized with Open
Source/Free Software, but also the resulting movie will be published
under an open public license. This makes it an exciting premiere as
first ever "Open Movie" project!  [ http://orange.blender.org ]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]