previous has asked for the wisdom of the Perl Monks concerning the following question:

Can someone please explain why this...
use Tkx; $mw=Tkx::widget->new("."); $text = $mw->new_tk__text(); $text->g_pack( -expand => 1, -fill => 'both', ); $text->insert("5.10", "testing"); Tkx::MainLoop();
isn't showing the string starting at line 5 char col 10 and is instead printing at the first line first col. Thank you in anticipation.

Replies are listed 'Best First'.
Re: difficulty inserting at line and character col in tkx text widget
by previous (Sexton) on Jan 24, 2016 at 15:27 UTC
    I forget a $my but the problem still remains
    use Tkx; $mw=Tkx::widget->new("."); my $text = $mw->new_tk__text(-width => 50, -height => 50); $text->g_pack( -expand => 1, -fill => 'both', ); $text->insert("5.10", "testing"); Tkx::MainLoop();
      Ok...I got it to "work" but only after I'd filled sufficient lines SEQUENTIALLY using $text->insert("end", $some_text."\n"); I was then able to insert stuff at the specified line and column.

        Now that you found out anyway, I can see it in the documentation, too :-)

        It's a bit cryptic, however.
        If index refers to the end of the text (the character after the last newline) then the new text is inserted just before the last newline instead.
        is probably meant to say
        Trying to insert anywhere after the end of existing text results in simply appending.