GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Aug 31, 2016 9:46 pm

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to set size of widgets in percentage
PostPosted: Fri Dec 07, 2007 9:12 am 

Joined: Thu Jun 14, 2007 8:05 am
Posts: 2
I am developing a gtk application to run on some other display. I want to maintain the size and layout of widgets that I have set on my desktop.For that I would like to specify widget size in percentage.

Any idea how can I do that...



 Post subject:
PostPosted: Sat Dec 08, 2007 7:16 pm 
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
Widgets are "packed" in GtkContainers. Using various packing properties such as "expand", "fill", and "homogeneous" allow you to control how GTK automatically sizes the widgets. This is typically all you need for any layout.

However, if you do need further control, you can use GtkFixed which allows for fixed positioning and GtkAspectFrame which uses a aspect ration to place the child widget. Use caution with these widgets as they allow you to override the behavior your users will be used to.

Micah Carrick - Forum Administrator

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: No registered users 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