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 

frame orientation

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


Joined: 16 Nov 2006
Posts: 201
Location: INDIA

PostPosted: Wed Aug 06, 2008 5:57 am    Post subject: frame orientation Reply with quote

hi all
i am doing an example for the frame orientation.
mean to say is
first i am taking a window, and then am putting a frame in to the window.
in this frame i am taking a label. and this all for gui. then

how can it work for the Landscape mode and portrait mode.

is there any way
Back to top
Micah Carrick
Never Seen the Sunlight


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

PostPosted: Fri Aug 08, 2008 12:56 am    Post subject: Reply with quote

Hey ramesh,

It's very hard to understand clearly what your problem is do to the less-than-perfect english.

A GtkFrame widget's size, like most other widgets, is partially determined by it's parent. That is, it's not a fixed size or fixed ratio. A simplified explanation is that it requests the size it thinks it needs from it's parent, and is given the best size available for it.

So, if you (for example) had a GtkLabel inside of a GtkFrame inside of a GtkWindow, and that window was resizable, then the frame would resize to the same ratio as the window. If the window's width was greater than it's height, then the same would apply to the frame and visa versa.

You are going to need to learn more about "size allocation" and "widget packing" as core GTK+ programming concepts. This can be one of the more difficult aspects to grasp conceptually, but you'll love it once you understand it. Try playing around with widget properties in Glade. Throw a bunch of widgets into other widgets and change 'expand', 'fill', and 'homogeneous' properties to see the effects in real time.

Cheers.
Back to top
ramesh
GTK+ Guru


Joined: 16 Nov 2006
Posts: 201
Location: INDIA

PostPosted: Fri Aug 08, 2008 3:55 am    Post subject: Reply with quote

i would like to change my frame to +90 degrees.
(ex: my frame contains labels,buttons,textentry,iconview must turn to 90 degrees)
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