Re: Extending PHP1 GTK Widget class with PHP?

From: Date: Wed, 07 Jun 2006 02:54:10 +0000
Subject: Re: Extending PHP1 GTK Widget class with PHP?
References: 1 2 3  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6995@lists.php.net to get a copy of this message
Hi Ben,
See below On Monday 05 June 2006 23:45, Malk0 wrote:
you can do function SuperTree(){ parent::SuperTree(); } this would work, by the way depending on what you really want to achieve it can be more suitable to create an object that contain an instance of a gtkwidget like this
So, let's say that I wanted to have a GtkText widget, but with some new method embedded, the following should work:?
Theoretically, yes. Please let us know if it doesn't... ;)
class ExtraText extends GtkText { Function ExtraText ($hadj=NULL, $vadj=NULL); { parent::gtkText($hadj, $vadj); } Function FancyExtraFunction() { DoSomethingReallyNeat(); } } // end of class ExtraText $eText=&New ExtraText(); $eText->Set_Usize($width, $height); $eText->Show(); $eText->FancyExtraFunction(); ?>
class SuperTree{ function SuperTree(){ $this->ctree = &new gtkctree(); } } this second manner will allow you to have other widget embedded in the SuperTree class, not the first one. hope this help, nathan


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