Re: working with objetcs into gtknotebook

From: Date: Fri, 24 May 2002 19:42:05 +0000
Subject: Re: working with objetcs into gtknotebook
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-2049@lists.php.net to get a copy of this message
<? if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') dl('php_gtk.dll'); else dl('php_gtk.so'); $window = &new GtkWindow; $window->set_title('Capturador de Teclas Tabajara'); $window->set_border_width(0); $window->set_uposition(80, 80); $window->realize(); $text = new gtktext; $text->set_editable(true); $text->show(); $notebook = new gtknotebook; $label = new gtklabel('Hello'); $notebook->append_page($text,$label); $notebook->show(); // inserting text $a = gdk::font_load ("-*-courier-medium-r-normal-*-*-148-*-*-*-*-*-*"); $text->insert($a, null, null, "sdlfkjsdlfkjsdfç\n"); //deleting text $length = $text->get_length(); $text->delete_text(0, $length); $text->freeze(); $text->thaw(); // getting text $length = $text->get_length(); $chars = $text->get_chars(0, $length); echo $chars; $window->add($notebook); $window->show(); Gtk::main(); ?> On Fri, 24 May 2002 21:39:54 +0200 epplestun <epplestun@alaplaya.com> wrote: > Hi, I need to select the widget of the selected page in gtknotebook, for > example: > > $text = new gtktext; > $text->set_editable(true); > $text->show(); > $notebook = new gtknotebook; > $label = new gtklabel('Hello'); > $notebook->append_page($text,$label); > $notebook->show(); > > How can I work with the text widget?¿ help me pls > > > > > -- > PHP-GTK General Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- echo ereg_replace (" -> ", " \n", "cheers -> Pablo"); PS: A Brasilian word: "Valeu" = "Thanks" + "Bye" +--------------------------------------------------+ | _ 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 | +--------------------------------------------------+

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