GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to set the window size to max height?

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
TualatriX



Joined: 03 Oct 2007
Posts: 2

PostPosted: Wed Oct 03, 2007 11:40 am    Post subject: How to set the window size to max height? Reply with quote

Hello everyone!

I'm a beginner of GTK+ Development. I want my application run like this:

when it opens, the window's width is set to 1024, and its height will be set
to the current available max height size. It's not the size of resolution of
current screen. Just the maximize window's height, the size not include the
two gnome-panel below and above, sometimes is a dock(awn or kiba-dock).

I tried several method, but failed.

Anyone can give me an idea?
Thank you very much.
Back to top
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 497
Location: Portland, OR USA

PostPosted: Wed Oct 03, 2007 2:53 pm    Post subject: Reply with quote

You're going to want to do some reading up on how Windows are sized and GTK+ basics. Most people will tell you not to do what you're asking to do--that it goes against some principles of usability. Allow the end user to decide what size the window is best for them and then remember that size next time your application loads.

In any case, check out:
gtk_window_set_default_size ()
gtk_widget_set_size_request ()
gtk_window_maximize ()
Back to top
TualatriX



Joined: 03 Oct 2007
Posts: 2

PostPosted: Fri Oct 05, 2007 2:10 am    Post subject: Reply with quote

Thank you! :D

I think I should read more about API.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP