Adding signal to Combobox
- From: "Mike Martin" <redtux1 googlemail com>
- To: gtk-perl-list gnome org
- Subject: Adding signal to Combobox
- Date: Wed, 31 Jan 2007 07:44:42 +0000
Is it possible to add a clicked signal to a combobox
ie: when I click the combobox it runs a sub before showing the list.
I have tried using button_prees_event in an enclosing eventbox but no joy
What I am trying to do is to update the list of the combobox from a
prefernce dialog
I have a button which works, but I would rather it be done automatically
sample
$opts_mod->signal_connect('clicked'=>sub{&opts($video_type);});
this runs
sub opts {
my ($video_type,$enc)= _;
my $model= $video_type->get_model;
$model->clear;
my $title='Select Encoding Type';
$video_type->append_text("$title");
foreach my $type (sort keys %options){
no strict 'refs';
if ($type ne 'dir' and $type ne 'feedback'){
$video_type->append_text($options{$type}[6]);
}
}
$video_type->set_active(0);
}
and works, but I just cant think how to do it automatically
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]