Word Wrap in Text widget with Perl-Gtk



I'm using Perl-Gtk.  I create a text widget with the following code
fragment:

    $wids{"notes"}=new Gtk::Text();
    $wids{"notes"}->insert($font,undef,undef,$char{"notes"});
    $wids{"notes"}->set_editable(1);
    $wids{"notes"}->set_word_wrap(1);
    $pagevbox->pack_start($wids{"notes"},1,1,0);
    $wids{"notes"}->show();

Unfortunately, the Text widget isn't documented in the Perl-Gtk Tutorial
yet (it is "Under Construction"), but I was able to get most of what I
needed out of the standard Gtk documentation.  That documentation
suggests that the code above ought to produce a text widget which wraps
the text at word boundaries.  However, that is not the case; I still get
the lines broken at the very character which is at the end of the line
(even if that is midword), and the little "return arrow" to indicate that
the line has been broken.

I get the same behavior whether or not I use the set_word_wrap(1) method
of the text widget.

Otherwise, everything is working.

Can anybody offer me any suggestions as to how to get word wrap working
properly with Gtk-Perl?

Thanks,

-Rob




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