Re: Gtk2::TextView problems output

On Monday 18 February 2008 21.56.03 kilckk wrote:
Hello everyone, I wanted to know how to retrieve the text in a textview.

That is an entry just do:

My $test = $app->get_widget ("test");
Print $test->get_text;

But with a TextView?

Thanks for your help.
Excuse my English: P

gtk-perl-list mailing list
gtk-perl-list gnome org

my $textview = Gtk2::TextView->new;

# put your text in it
my $buffer = $textview->get_buffer;
$buffer->insert ($buffer->get_end_iter, $text);


$dialog->run() ;

#retrieve the text
my $new_text =  $textview->get_buffer->get_text($buffer->get_start_iter, 
$buffer->get_end_iter, TRUE) ;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]