Re: Is widget in Notebook visible
- From: Tristan Van Berkom <tvb gnome org>
- To: jeff_barish earthlink net
- Cc: gtk-list gnome org
- Subject: Re: Is widget in Notebook visible
- Date: Thu, 2 Sep 2010 14:00:09 +0900
On Thu, Sep 2, 2010 at 11:03 AM, Jeffrey Barish
<jeff_barish earthlink net> wrote:
> I have a custom widget that resides on a page of a notebook. I would like
> for the widget to be able to detect by itself when it becomes visible or
> invisible (as the user selects pages of the notebook). The expose-event
> tells me when the widget becomes visible, but I can't find a corresponding
> event that tells me the converse. Likewise, the visibility-notify-event
> tells me only when the widget becomes visible, not the converse. Any
> suggestions?
Firstly if its a custom widget of your making and needs to run code..
it should generally not connect to signals on its own class... instead you
should implement the appropriate methods on the class directly.
A widget's visibility status is not exactly what you are looking for
(A widget's "visible" flag is TRUE if the client code wants the widget
to be visible... whether its on a page that is mapped or not).
You will (most probably) want to implement ->map() and ->unmap() in
your custom widget class to detect if its actually shown or not.
Cheers,
-Tristan
> --
> Jeffrey Barish
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]