GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Oct 23, 2014 5:52 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Border around a row in GTKTreeView
PostPosted: Sat Nov 19, 2011 10:38 am 
Offline
Familiar Face

Joined: Sat Nov 19, 2011 10:28 am
Posts: 7
Hi,
I need to draw a border around a particular row in the gtktreeview, I am able to set the cell-background color for each cell but how do i set cell border color.

Thanks in Advance
Kowsalya


Top
 Profile  
 
 Post subject: Re: Border around a row in GTKTreeView
PostPosted: Wed Nov 23, 2011 10:26 am 
Offline
Familiar Face

Joined: Sat Nov 19, 2011 10:28 am
Posts: 7
Hi people,
My post has no replies still kindly give me some input am not able to proceed on this


Top
 Profile  
 
 Post subject: Re: Border around a row in GTKTreeView
PostPosted: Wed Dec 14, 2011 7:36 am 
Offline
GTK+ Guru

Joined: Fri Mar 25, 2011 5:16 pm
Posts: 177
Location: USA
Post your:
1) existing code
2) GTK version your running
3) OS and version, i.e. Linux Ubuntu 11.04


Top
 Profile  
 
 Post subject: Re: Border around a row in GTKTreeView
PostPosted: Mon Feb 27, 2012 2:51 pm 
Offline
Familiar Face

Joined: Sat Nov 19, 2011 10:28 am
Posts: 7
Solved this problem by getting the cell height and width where border needs to be drawn and drew the border using drawing area. will be posting the code shortly


Top
 Profile  
 
 Post subject: Re: Border around a row in GTKTreeView
PostPosted: Thu Nov 15, 2012 10:39 pm 
Offline

Joined: Thu Nov 15, 2012 10:29 pm
Posts: 3
Kowsalya, please share more information on how you solved it. (I don't understand how to use DrawingArea to draw a border around a row in the TreeView)


Top
 Profile  
 
 Post subject: Re: Border around a row in GTKTreeView
PostPosted: Fri Nov 16, 2012 7:12 am 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
Kowsalya, this method seems quite unideal.
If you are using gtk3 properties such as the border colour can be controlled using css. Zerohour has put together a number of tutorials about it http://www.gtkforums.com/viewtopic.php?f=3&t=988&start=15. This is why you were asked what version of gtk you were using. How you approach the problem will depend on what version you have (in gtk2 styling can be done with rc files).
Even if you get your drawing area to fit the cells perfectly and track changes to them and update smoothly, you are essentially bloating your code with procedures that are already in-built in gtk.


Top
 Profile  
 
 Post subject: Re: Border around a row in GTKTreeView
PostPosted: Fri Nov 16, 2012 2:28 pm 
Offline

Joined: Thu Nov 15, 2012 10:29 pm
Posts: 3
I am trying to figure out how to put a border around a selected row (row in TreeView).

I am using gtk 2.12.9 (MontaVista Linux version 4.0.1, Linux kernel 2.6.10). And, I don't have the premissions to upgrade to gtk 3.

Any help is greatly appreciated.


Top
 Profile  
 
 Post subject: Re: Border around a row in GTKTreeView
PostPosted: Sat Nov 17, 2012 5:43 am 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
Actually I didn't turn up anything concerning borders in gtkrc files. Seems the method often employed in gtk2 is to pack your widget in an eventbox or frame and set the background of the eventbox/frame to give the colour and the spacing to give the width. Might be a whole lot trickier to border entire rows as opposed to individual cells (would have to check with someone with significant treeview experience).


Top
 Profile  
 
 Post subject: Re: Border around a row in GTKTreeView
PostPosted: Mon Nov 26, 2012 5:13 pm 
Offline

Joined: Thu Nov 15, 2012 10:29 pm
Posts: 3
Thank you, Paul Childs, for looking in to this. Good to know that I can't use gtkrc for this.

I have no idea how to border the 'entire' row. Giving up on Treeview. I'll probably try a VBox with buttons or something else.


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

All times are UTC


Who is online

Users browsing this forum: Google [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