RE: [PHP-GTK] Actions to other place

From: Date: Wed, 03 Jul 2002 15:56:01 +0000
Subject: RE: [PHP-GTK] Actions to other place
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-2189@lists.php.net to get a copy of this message
Well.. I want this: That when I clicked a button.. other widgets will be showing in a frame or in a box. Paul >>>> I didnt understant what you was trying to do passing $frame (adding a new button on ?)... But I hope this can help you a lil bit. Pablo <? if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') dl('php_gtk.dll'); else dl('php_gtk.so'); $window= new GtkWindow; $vbox= new GtkVBox; $window->add($vbox); function c_button_2($button) { echo "something\n"; } $frame = &new GtkFrame("Frame"); $vbox->pack_start($frame); $button = &new GtkButton("Action Button"); $button->connect('clicked','c_button_2'); $frame->add($button); $window->show_all(); Gtk::Main(); ?> On 02 Jul 2002 21:48:55 -0500 Pablo Fischer <exilion@yifan.net> wrote: > Hi.. > > :(.. I dont know how to fix it.. tell me If Im right: > > function c_button_2() { > $button_2 = &new GtkButton("Button 2"); > return $button_2; > } > > (create the window and a Vbox). > > $button = &new GtkButton("Action Button"); > $button->connect('clicked','c_button_2',$frame); > $vbox->pack_start($button); > > $frame = &new GtkFrame("Frame"); > $vbox->pack_start($frame); > > $window->show_all(); > > And nothing happens. The Button that its suppoused to be created.. > doesnt appear in the frame. > > Paul Fischer > > > > a gtkframe is derived from gtkbin > > > > it will only take one child > > > > you need to remove() that child before you can add() another child > > > > please turn your error reporting to E_ALL > > > > ----- Original Message ----- > > From: "Pablo Fischer" <exilion@yifan.net> > > To: <php-gtk-general@lists.php.net> > > Sent: Tuesday, July 02, 2002 9:36 PM > > Subject: [PHP-GTK] Actions to other place > > > > > > > Hi.. > > > > > > Now that I have the layout of my application I dont understand (and > > dont > > > know) how to do this: > > > > > > I want that when I click a button it shows me other Widgets.. but JUST > > > in a Frame. > > > > > > For example.. I have three buttons: Sodas & Food. > > > > > > That when I click "Sodas" button.. more buttons will appear in a Frame > > > (Cocacola button, Pepsi button.. etc). > > > > > > How can I do this?. > > > > > > Thanks, > > > Paul Fischer. > > > > > > > > > -- > > > PHP-GTK General Mailing List (http://gtk.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > -- > PHP-GTK General Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- +--------------------------------------------------+ | _ Pablo Dall'Oglio (pablo@php.net) | | °v° Univates - IT Department +55 51 3714-7040 | | /(_)\ The best source is the source code | | ^ ^ Linux User n.223253, Lajeado, RS - Brasil | +--------------------------------------------------+ : Programmer, pilot, wine taster and a half musician

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