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 Jul 25, 2014 11:17 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Parent resizing according to the child widget
PostPosted: Mon Nov 26, 2012 5:52 am 
Offline
Familiar Face

Joined: Thu Nov 01, 2012 5:48 am
Posts: 30
Hi ,

Could anyone tell how to resize the parent window according to the child widget .

Regards
Himanshu


Top
 Profile  
 
 Post subject: Re: Parent resizing according to the child widget
PostPosted: Mon Nov 26, 2012 6:39 am 
Offline
GTK+ Guru

Joined: Fri Mar 25, 2011 5:16 pm
Posts: 177
Location: USA
If I understand you correctly, what you want is the following two functions:
gtk_widget_set_hexpand()
gtk_widget_set_vexpand()


Top
 Profile  
 
 Post subject: Re: Parent resizing according to the child widget
PostPosted: Mon Nov 26, 2012 9:51 am 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
You should never set the parent window.
People with small displays, e.g. netbooks etc. rely on the fact that a window will always be able to fit in their screen else some content will be off screen and inaccessible.
Let the window manager and the user handle the size of the window, and just focus on the content. Most parent widgets will automatically resize so their children fit fine.
you can set defaults and give suggestions for the parent window; but please don't try to force it. This will likely only result in a broken app.


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