Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: How to use Tk::Text->SetCursor (INDICES/INDEX)

by Anonymous Monk
on Nov 08, 2013 at 20:25 UTC ( #1061767=note: print w/replies, xml ) Need Help??

in reply to How to use Tk::Text->SetCursor


nope -- perldoc Tk |grep -in position

nope -- grep SetPosition -r Tk-804.031

*brains* -- I remember its you want

$text->SetCursor( "$line.$char" ); $text->SetCursor( "+ $count chars" ); $text->SetCursor( "- $count chars" ); $text->SetCursor( "+ $count lines" ); $text->SetCursor( "- $count lines" ); $text->SetCursor( "wordstart" ); $text->SetCursor( "wordend" ); $text->SetCursor( "linestart" ); $text->SetCursor( "lineend" ); $text->SetCursor( "imageName" ); $text->SetCursor( $widget ); $text->SetCursor( "tag.first" ); $text->SetCursor( "tag.last" ); $text->SetCursor( "mark" ); $text->SetCursor( "othermark" ); $text->SetCursor( "end" ); $text->SetCursor( "@30,50" ); ## pixels

Replies are listed 'Best First'.
Re^2: How to use Tk::Text->SetCursor (INDICES/INDEX)
by Yu Chen (Initiate) on Nov 08, 2013 at 20:50 UTC
    Thanks man.
    But I still cannot understand.
    For example, How to move the insert cursor to 3rd line?

      You buy it dinner first?

      my $line = 3; my $char = 0; $text->SetCursor( "$line.$char" ); $text->SetCursor( "3.0" );
        Yes, it works well. Thank you very much!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1061767]
[M4ver1k]: I feel like being able to toggle a running script on the fly by updating variables from a config file using Config::Simple. But in the while loop, it seems like it doesn't update the variable after the first past. Is this generally just a bad idea?
[M4ver1k]: pass*

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2017-11-20 03:07 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (283 votes). Check out past polls.