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 Aug 28, 2014 3:07 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How can I make abeveled border container a la Frame? (PyGTK)
PostPosted: Wed Dec 05, 2007 7:07 am 
Offline

Joined: Wed Dec 05, 2007 6:53 am
Posts: 1
Hi, thanks for reading this.

I'd like certain data widgets to be inside a container widget similar to Frame. However, I'd like the container widget to have a border like a bevel instead of Frame's simple lines.

Does this exist already?
Do I need to make a child class of Frame, and somehow manipulate pixels?

Thanks!


(Less important part of the post)

How much control does a developer have with the appearance of GTK widgets besides the color of various parts?
I admit I am not experienced with GTK. After going through the tutorial(s), I get the impression they want you to stick with the plain widgets they have, perhaps to keep deployed apps on different platforms look uniform (just my guess, again probably from inexperience).


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 05, 2007 12:33 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
You can use GtkFrame's shadow-type property to change the look of the border.

As for customization, you have quite a bit. You have basic properties, which decide how the widget will behave and some of the looks. Then, a lot of widgets have "style properties" that can change the look and feel of the widget. For this, you would use RC files, usually called gtkrc.

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 05, 2007 3:53 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
Quote:
How much control does a developer have with the appearance of GTK widgets besides the color of various parts?
I admit I am not experienced with GTK.


The reason for this is to support themes. Most users, including myself, like to be able to pick (or create) a theme most pleasing to them. If the developer was specifying where every pixel is drawn, then a user could not have themes (ie Windows) and every application would look different.

Best practice is to adhere to standard conventions adopted by the GTK+ programming community (google "GNOME HIG").

So, that being said and as Andrew mentioned, you can use GtkRC styles to really tweak the appearance, however, remember about the user's theme!

In most themes, the GtkFrame has an 'Etched In' border which is similar to that on windows--but again, that is dependent upon the user's theme. Try looking at your application under several themes to get a feel for it (themes use rc files).

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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