Re: Toggle Button

From: Date: Sat, 17 Dec 2005 22:09:52 +0000
Subject: Re: Toggle Button
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6421@lists.php.net to get a copy of this message
Christian Weiske wrote:
function chkStart_toggled() { if ($chkStart->get_active == GTK_STATE_ACTIVE)
                         echo "Active";
else
	          echo "Inactive";
return; }
Two: 1. get_active is a method and needs to be called as "$chkStart->get_active()" 2. get_active() returns a boolean value IMO. So checking if ($chkStart->get_active()) {..} should do the job.
Also, you need to put the variable in the function signature: function chkStart_toggled($chkStart) Scott

« previous php.gtk.general (#6421) next »