Re: Gtk::Text



Well once again this is probably not the most efficient way in the world
but heres what I would do

$length = $text->get_length
$text->set_point(0)
$ezvan = $text->get_chars(0,$length)

I think you might also be able to get away with this
$ezvan = $text->get_chars(0,-1)

Hope this helps
Andrew Ryan
On Sat, 2 Mar 2003, Peter K. Polinak wrote:

I think you might also be able to get away with this
Hi again!

Another question:

If i insert a Gtk::Text widget, like

$text=new Gtk::Text();
$text->set_editable(1);
$text->show();

how can I extract the text I entered the textbox to a scalar variable?
I'd like to print out the text I entered to the screen for example, or
perform other operations with the text, save it to a file, etc... I
tried

$text->get_text($ezvan);
print $ezvan;

but it didn't work, got an error message:

Can't locate object method "get_text" via package "Gtk::Text" at elso.pl
line 49

Thanks for your answer!

Regards,

Peter




_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list




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