Re: Invisible GtkImage



For a vertically orientated GtkBox, the 'expand' field in pack_start
is going to be vertical expansion, so you are not going to want that.
Instead set the GtkBox.set_hexpand(true) (and
GtkBox.set_halign(GTK_ALIGN_FILL)), but definitely do pack children
with Fill=True.
Make sure both the GtkAspectFrame and the GtkDrawingArea are set to
both set_halign(GTK_ALIGN_FILL) and set_valign(GTK_ALIGN_FILL).

That means the aspect frame will receive the extra width, and its
internal ratio keeping will make its implementation of
get_requested_height_for_width() request enough height for your image
to expand properly.

Its all a problem of packing with expand & fill at this point. Just
think about how you want the toolkit to work and make sure each
component in the hierarchy is doing the right thing.

Hey Andrew. Thanks for the help. I've almost got it working after I took
your advise, but the image is still taking up too much room in the
vertical GtkBox above and below it. See all the extra space above and
below it I'd like collapsed:

        <http://en.zimagez.com/zimage/box36.php>

Here is my code:

        <http://pastebin.com/mtVNsPrb>

Thanks a lot,

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]