GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sun Nov 23, 2014 1:00 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Data aware Gtk widget?
PostPosted: Tue Feb 26, 2013 8:42 pm 
Offline
Familiar Face

Joined: Fri Jul 01, 2011 6:40 pm
Posts: 48
Location: Croatia
In order to look on how to program Gtk# with mono and stetic...

I just want to get info if some data aware widgets exists in Gtk.
In MS programming tools there is dataadapters, bindingsources etc. for automatically connect some widgets to data (grid, combo, textboxes etc.)
I ask that because I try to fill GtkTreeView by looping through reader's collection and this is really unacceptable slow with large amount of data.

How Gtk programmers deal's with such situations?


Top
 Profile  
 
 Post subject: Re: Data aware Gtk widget?
PostPosted: Sun Mar 03, 2013 6:45 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 777
Location: UK
Hi,

The GtkTreeView, GtkComboBox etc.... are all general widgets to handle the majority of cases. This does mean it will not be the most efficient for everyone.

So if you are adding anything to a GtkTreeView it would require that on every insertion that it would recalculate the size of and height of everything stored for display and request a re-draw. What you could do to improve performance is to not realize the GtkTreeView widget before adding the large number of items to the Model or temporally disconnect the Model from the GtkTreeView before adding the large number of items.

Take a look at this tutorial (it may be old, though most is still relevant) http://scentric.net/tutorial/treeview-tutorial.html and in particular http://scentric.net/tutorial/sec-treemodel-add-rows.html#sec-treestore-adding-many-rows

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group