Expanders and non-label headers

Hi all,

I'd like to use an expander to hide/show details for some emails that are to be processed as reports. A small amount of these details should be visible at all times (along with a few command buttons and a checkbox), and I was going to replace the label of the expander with a table containing the need-to-see information and the command buttons and checkbox, but I've hit a snag - widgets that replace the expander label lose their default actions and cause the expander to open/shut when they're clicked. Eg (using only a checkbutton):

use Gtk2 -init;
$mw = Gtk2::Window->new;
$ex = Gtk2::Expander->new(undef);
$cb = Gtk2::CheckButton->new("TEST");
$lb = Gtk2::Label->new("BOO!");
$mw->signal_connect("delete_event", sub {exit});

As you can see, unless you're _very_ careful where you put the mouse, clicking on the checkbutton triggers the expander, not the checkbutton.

Is there something I can do to change this (that I can apply to various widgets, not just checkbuttons) so that my expander 'header' is something more useful than a simple label?



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