Re: EventBox's focus
- From: Owen Taylor <otaylor gtk org>
- To: htn3463 osfmail isc rit edu
- Cc: gtk-list redhat com
- Subject: Re: EventBox's focus
- Date: 11 May 1998 14:20:56 -0400
htn3463@osfmail.isc.rit.edu writes:
> Hello,
> How do I draw_focus on an eventbox?. for example, I have a
> label drawn onto a event_box, I like to have it PRELIGHT'ed when the
> pointer's moved over like what will happen if it's a button. Thank
> You.
(If we are being picky, "Focus" is actually the black square
that gets drawn around widgets when you Tab to them. This is
just "prelight")
- Set up a "enter_event" handler and a "leave_event" hander,
- call:
gtk_widget_set_events (eventbox,
GTK_ENTER_NOTIFY_MASK | GTK_LEAVE_NOTIFY_MASK);
- In the "enter_event" handler, call
gtk_widget_set_state (GTK_STATE_PRELIGHT);
- in the "leave_event" handler, call
gtk_widget_set_state (GTK_STATE_NORMAL);
I think that should do it. Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]