tags:

views:

28

answers:

1

My application performs a 90 degree rotation on a drawing area, so the width and height of the drawing area need to be swapped.

How can I resize the drawing area with GTK in a way so that the new width and height are actually enforced, not just requested?

+1  A: 

Width/height cannot be enforced by a widget, they are determined by its container only. Widget can only request given dimension and its container will allocate the requested area or more (or even less, but all standard containers won't do this).

So, the answer would completely depend on how the area is packed and into what container. If your window (as in GtkWindow) doesn't include anything expandable, setting it to be non-resizable mode will achieve what you want. Otherwise, please specify how the area is packed and/or what other widgets are in the toplevel.

doublep
Wow, GTK is a real pain. Thanks for your clear answer though!
Pieter
@Pieter most toolkits I've worked with are like that...
Spudd86