Re: How to find width of a menubar?
- From: "Sudrien" <sudrien fusemail com>
- To: "Vladislav Grinchenko" <3rdshift comcast net>
- Cc: Gtkmm list <gtkmm-list gnome org>
- Subject: Re: How to find width of a menubar?
- Date: Wed, 26 Jan 2005 21:22:42 -0600 (CST)
Yes, that does get set off a lot - but The window already has its own
on_configure_event, so I expected it to happen frequently. But not that
frequently. Wow.
At least it gives the immediate responce I needed - now just to figure out
exactly when I need it.
Thank you.
-Sudrien
[darimasen.berlios.de]
> this is not quite correct as a general solution, because many widgets
>> render into their parent's window.
>>
>> the more general solution is to connect to the allocate signal for the
>> widget, which is emitted every time GTK recomputes the size that the
>> widget will be rendered at.
>>
>> --p
>
> I second that. BTW, when you connect to the signal and trace the
> frequency of the callback being fired, you would be surprised how often
> that happens.
>
> If you need the correct syntax, here is an example:
>
> <http://cvs.sourceforge.net/viewcvs.py/granule/granule/src/DeckPlayer.cpp?rev=1.62&view=auto>
>
> Search for 'signal_size_allocate' and 'size_allocate_cb'
>
>
> -- Vlad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]