Re: ToggleButton Change Icon
- From: "A. Pagaltzis" <pagaltzis gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: ToggleButton Change Icon
- Date: Tue, 24 Aug 2004 19:39:36 +0200
* Daniel Flemming <danflemming mac com> [2004-08-24 15:59]:
...
$widget->set_label('pause');
$widget->set_use_stock(TRUE);
...
$widget->set_label('play');
$widget->set_use_stock(TRUE);
* William B Carlson <carls107 msu edu> [2004-08-24 18:39]:
$button_start->signal_connect (clicked => sub {
if ($start == 0 ) {
$_[0]->set_label('gtk-stop');
$_[0]->set_use_stock(TRUE);
$start = 1;
Glib::Timeout->add(2000, \&start_cb );
} else {
$_[0]->set_label('gtk-execute');
$_[0]->set_use_stock(TRUE);
$start = 0;
}
});
You both realize that you only need to ->set_use_stock( TRUE )
once, ever, right? There's no point in setting it over and over.
Regards,
--
Aristotle
"If you can't laugh at yourself, you don't take life seriously enough."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]