Re: dynamic gtk_list_store
- From: Peter Clifton <pcjc2 cam ac uk>
- To: Martijn Bos <martijnm bos gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: dynamic gtk_list_store
- Date: Tue, 21 Aug 2007 21:39:59 +0100
On Tue, 2007-08-21 at 22:20 +0200, Martijn Bos wrote:
Hi list,
I'm wondering whether it's possible to create a gtk_list_store at runtime.
Sometimes my data has (for instance) 1 column and sometimes my data has (for
instance) 8 columns. (It will be read from file)
As far as I have seen in he documentation, the model is "designed" when
programming.
Is there a possibility to create the model (and the necessary views) at
runtime?
If yes.... can you please point me to some documentation or hints?
Look at gtk_list_store_newv (), it takes an array of GTypes rather than
being a vararg function. You should be able to construct the array at
run-time.
http://library.gnome.org/devel/gtk/stable/GtkListStore.html#gtk-list-store-newv
Or use "devhelp", which displays the same help content locally if you
have the appropriate -doc packages installed for your distribution.
Regards,
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]