Re: populate gtk tree view from outside

2012-09-12 Thread Rudra Banerjee
Oliver, Thanks a lot. Its working properly. Only change that I have made is using gtk_tree_store_append in place of gtk_tree_model_get_iter_first. Thanks a lot again. Regards, On Wed, 2012-09-12 at 21:31 +0200, Olivier Sessink wrote: > On 09/12/2012 06:30 PM, Rudra Banerjee wrote: > > Oliver, > > T

Re: populate gtk tree view from outside

2012-09-12 Thread Olivier Sessink
On 09/12/2012 06:30 PM, Rudra Banerjee wrote: > Oliver, > Thanks for your reply. > The problem basically is to pass on the function argument from one to > other. you need to create a header file (main.h) that has the enum, and extern GtkListStore *treestore; in main.c define GtkListStore *treesto

Re: populate gtk tree view from outside

2012-09-12 Thread Rudra Banerjee
Oliver, Thanks for your reply. The problem basically is to pass on the function argument from one to other. So, if I make a more detail, then In file: main.c I have: enum { COL_FIRST_NAME = 0, COL_LAST_NAME, COL_YEAR_BORN, NUM_COLS } ; static GtkTreeModel * create_and_fill_model (void) {

Re: populate gtk tree view from outside

2012-09-12 Thread Olivier Sessink
On 09/12/2012 12:21 PM, Rudra Banerjee wrote: [..] > > strAuth = gtk_entry_get_text(GTK_ENTRY(e->entryAuth)); > strEditor = gtk_entry_get_text(GTK_ENTRY(e->entryEditor)); > > > Is it possible to add these strAuth, strEditor in those treeview's 1st > and 2nd column? just acquire an iterato

populate gtk tree view from outside

2012-09-12 Thread Rudra Banerjee
Dear friends, I have defined a treeview model as follows: enum { COL_FIRST_NAME = 0, COL_LAST_NAME, COL_YEAR_BORN, NUM_COLS } ; static GtkTreeModel * create_and_fill_model (void) { GtkTreeStore *treestore; GtkTreeItertoplevel, child; treestore = gtk_tree_store_new(NUM_COLS,

Re: GTK Tree View

2008-06-05 Thread Kristian Rietveld
On Wed, Jun 04, 2008 at 03:26:33PM -0400, Eric Pastoor wrote: > I'm calling the function on the signal connected to row-expand. That's probably one of the problems, since at that point the exact heights and locations aren't known yet (these are calculated in an idle). You might want to use an idl

Re: GTK Tree View

2008-06-04 Thread Eric Pastoor
I'm calling the function on the signal connected to row-expand. Only the smaller tree is visible to the user because the rest extends past the viewable area of the scroll. What I mean is that the scroll bar needs to be scrolled down to see the rows at the bottom. I'm trying to get just the r

Re: GTK Tree View

2008-06-04 Thread Kristian Rietveld
On Wed, Jun 04, 2008 at 02:26:55PM -0400, Eric Pastoor wrote: > And I expand on Root so that it looks like > Root > --> Sub Tree A > --> Sub Tree B > --> Sub Tree C > > The result of that get_visible_range function is start:0 end: 0 I get 0 to 0:2 in such cases, which is the correct v

Re: GTK Tree View

2008-06-04 Thread Eric Pastoor
Thanks for the tip. I just tried that though but it doesn't seem to show what I'm looking for If I have a tree that starts out like: Root And I expand on Root so that it looks like Root --> Sub Tree A --> Sub Tree B --> Sub Tree C The result of that get_visible_range function is

Re: GTK Tree View

2008-06-04 Thread Kristian Rietveld
On Wed, Jun 04, 2008 at 11:14:13AM -0400, Eric Pastoor wrote: > What is the best way to determine if a row of a tree is inside the > visible part of scrolling window or not? For instance, if I hit the > expand on a tree item, I'd like to know if a certain child in that > tree is visible to t

GTK Tree View

2008-06-04 Thread Eric Pastoor
What is the best way to determine if a row of a tree is inside the visible part of scrolling window or not? For instance, if I hit the expand on a tree item, I'd like to know if a certain child in that tree is visible to the user or if it outside of the scrollable viewing area? Eric Pasto