But I need to have there also a Button which will stop/start scrolling in the ExecuteCommand window
You can't. At least you can't without rewriting/overriding a private method of Tk::ExecuteCommand.
The _read_stdout sub is the problem.
sub _read_stdout { # Called when input is available for the output window. Also chec +ks # to see if the user has clicked Cancel. my($self) = @_; if ($self->{-finish}) { $self->kill_command; } else { my $h = $self->{-handle}; if ( sysread $h, $_, 4096 ) { my $t = $self->Subwidget('text'); $t->insert('end', $_); $t->yview('end'); } else { $self->{-finish} = 1; } } } # end _read_stdout
That line: $t->yview('end'); is the problem. Every time it reads anything from the handle, it is going to scroll to the end of the text widget. It would be fairly trivial to modify the sub to scroll unless a "no scroll" flag is set, and you could easily modify it locally. It may be worth emailing the module author and asking to have that functionality added. I have found Steve to be relatively receptive to comments and requests.
In reply to Re: Tk::ExecuteCommand stop scrolling
by thundergnat
in thread Tk::ExecuteCommand stop scrolling
by dzon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |