Re: test question

From: Date: Fri, 10 Oct 2003 16:53:59 +0000
Subject: Re: test question
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-3952@lists.php.net to get a copy of this message
            Hello Bogomil,
You can see below the complete example as answer of your question : *<?php if ( !class_exists( "gtk")) { if ( strtoupper( substr( PHP_OS, 0, 3)) == "WIN") {
       dl( "php_gtk.dll");
} else {
       dl( "php_gtk.so");
} }
   $strTextToShow =    "ala\n" .
               "bala\n" .
               "nica\n" .
               "turska\n" .
               "panica\n" .
               "oii\n" .
               "gidi\n" .
               "vancho\n" .
               "nash\n" .
               "kapitancho";
$window = &new GtkWindow(); $window->realize(); $window->set_policy( false, true, false); $window->set_position( GTK_WIN_POS_CENTER); $window->connect_object( "destroy", array( "gtk", "main_quit")); $window->connect_object( "delete-event", array( "gtk", "false")); $txtWnd = &new GtkText(); $txtWnd->set_usize( 150, 120); $txtWnd->set_line_wrap( true); $txtWnd->set_word_wrap( true); $txtWnd->set_editable( true); ////////////////////////////////////////// // The essential is in the next 3 lines $scrollWnd = &new GtkScrolledWindow(); $scrollWnd->set_policy( GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); $scrollWnd->add( $txtWnd); $window->add( $scrollWnd); $window->show_all(); $txtWnd->freeze(); $txtWnd->insert_text( $strTextToShow, 0); $txtWnd->set_position( 0); $txtWnd->thaw(); gtk::main(); ?>* Regards, Radko Mr. Bogomil Shopov wrote:
Can you tell me how can I add a scroll to GTKText? Thanks Bogomil


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