GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Aug 01, 2014 9:52 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Is there any grid widget?
PostPosted: Fri Feb 01, 2013 11:16 am 
Offline
Familiar Face

Joined: Wed Oct 10, 2012 5:42 pm
Posts: 5
Hello, I wanna make something like Gnumeric for my report-builder program. But I couldn't find grid-widget in GTK+/GTKmm, does anyone know where can I find any similar widget?

Thanks in advance.


Top
 Profile  
 
 Post subject: Re: Is there any grid widget?
PostPosted: Sat Feb 02, 2013 7:07 pm 
Offline
GTK+ Geek

Joined: Fri Sep 04, 2009 6:53 am
Posts: 68
GtkTreeView with a GtkListStore as a model.


Top
 Profile  
 
 Post subject: Re: Is there any grid widget?
PostPosted: Mon Feb 04, 2013 9:30 am 
Offline
Familiar Face

Joined: Wed Oct 10, 2012 5:42 pm
Posts: 5
asdfgh2091 wrote:
GtkTreeView with a GtkListStore as a model.


Thanks asdfgh2091, but I am afraid that is not what I want. I would like to draw border lines in any cells, I am not sure GtkTreeView lets it.


Top
 Profile  
 
 Post subject: Re: Is there any grid widget?
PostPosted: Mon Feb 04, 2013 1:34 pm 
Offline
Never Seen the Sunlight

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

There is no one widget as such in GTK+ that does the spreadsheet style widget that you want. In Gnumeric it is more likely to be a custom widget that was created just for that application. This is what you will need to do for your application, possibly basing it on other widgets to make it easier for you. You could also take a look at the sources for Gnumeric to get ideas on how to do this.

If all you need is a Tree View to give a table for a result from say a data base then a GtkTreeView may possbile be OK with some modification to change styling. How you do this will vary depending on which version of GTK+ you are using and what you also want.

_________________
E.


Top
 Profile  
 
 Post subject: Re: Is there any grid widget?
PostPosted: Tue Feb 05, 2013 1:48 pm 
Offline
Familiar Face

Joined: Wed Oct 10, 2012 5:42 pm
Posts: 5
errol wrote:
Hi,

There is no one widget as such in GTK+ that does the spreadsheet style widget that you want. In Gnumeric it is more likely to be a custom widget that was created just for that application. This is what you will need to do for your application, possibly basing it on other widgets to make it easier for you. You could also take a look at the sources for Gnumeric to get ideas on how to do this.

If all you need is a Tree View to give a table for a result from say a data base then a GtkTreeView may possbile be OK with some modification to change styling. How you do this will vary depending on which version of GTK+ you are using and what you also want.


Thanks errol. I hope Gnumeric's sources will help me.


Top
 Profile  
 
 Post subject: Re: Is there any grid widget?
PostPosted: Tue Feb 05, 2013 5:46 pm 
Offline
GTK+ Geek

Joined: Fri Sep 04, 2009 6:53 am
Posts: 68
You can draw borderlines in a treeview by using http://developer.gnome.org/gtk3/stable/GtkTreeView.html#gtk-tree-view-set-grid-lines


Top
 Profile  
 
 Post subject: Re: Is there any grid widget?
PostPosted: Wed Feb 06, 2013 5:20 pm 
Offline
Familiar Face

Joined: Wed Oct 10, 2012 5:42 pm
Posts: 5
asdfgh2091 wrote:


Thanks asdfgh2091. I am not sure is this what I want, I meant this:

Image

GtkTreeView is nice widget, but I'm afraid for "report-builder" and especially for printing out reports, GtkTreeView is not suitable.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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