GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Oct 25, 2014 12:41 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 
Offline

Joined: Thu Jun 14, 2007 8:05 am
Posts: 2
Hello...
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...

Thanks

Prashant


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 08, 2007 7:16 pm 
Offline
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
http://www.micahcarrick.com


Top
 Profile  
 
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 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group