Re: Expanders and non-label headers



* Matthew Braid <ptkperl mdb id au> [2006-09-19 07:50]:
widgets that replace the expander label lose their default
actions and cause the expander to open/shut when they're
clicked.

Not so, it appears. If you connect a handler to the
`button-press-event` signal on the checkbox, youâll see that the
widget never even sees the event. Expander seems to be
intercepting all clicks to the label widget area, kind of like an
EventBox. (Maybe in order to avoid having to instantiate an
Eventbox in order to receive clicks to the label?)

Thatâs why clicking in *just* the right spot still checks the
box: the default action is still there, and if you manage to
click outside the Expander-seized area but inside the checkboxâs
area, then the checkbox sees the click and reacts just like
always.

Not sure of a good way to solve this. Probably something hackish
like connecting a handler to the click event on the Expander and
swallowing and relaying the event to the label widget when
appropriate, or something like that.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



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