more size questions

My understanding (such as it is) after googling is that in order to control
the foreground and background colours for a Label, one actually has to
define both a Label and an EventBox of the same size (because the
background of a Label is actually transparent).

But I find that strange things happen if I define a Label to be the same
size as the EventBox (by "same size" I mean that he parameters to
set_size_request() are identical; see my earlier question in e-mail
<4E690F18 2030003 gmail com>).

If I then execute
I see that the height painted on the screen is different (greater) than is
the case if I don't add the label.

Can someone please explain in more or less plain English what's going on?
It's obvious that my mental model of how this stuff works is entirely
wrong, and I'm afraid that I can't find any documentation that clarifies
the situation.


PS I tried executing get_height() on both the eventbox and the label in an
effort to determine what heights they really were -- and whether they were
the same -- but mysteriously I just get the number "1" back from both
calls. The height of both is definitely greater than 1 (the requested
height is 16), so I don't know why get_height() thinks otherwise.

PPS Sorry to be so thick.


Attachment: signature.asc
Description: OpenPGP digital signature

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