in reply to RE: RE: Waking up text select
in thread Waking up text select
So it looks like Linux doesn't care about where the focus is, when it's selecting text. Having to push the focus around to do selections strikes me as more than a little odd. Apparently Linux has the same opinion.. Anyways, glad you were able to puzzle this one out -- it looks like it's one of the long list of "problems that aren't documented anywhere, but should be!"#!/usr/local/bin/perl use Tk; use Tk::ROText; my $mw = MainWindow->new(); $a=$mw->ROText(height=>2)->pack; $a->insert('end','foo'); $a->focus; $rot = $mw->ROText(height=>2)->pack; $a=$mw->ROText(height=>2)->pack; $a->insert('end','foo'); $a->focus; $rot->insert('end', 'foo '); $a=$mw->ROText(height=>2)->pack; $a->insert('end','foo'); $a->focus; $rot->insert('end', 'the bar', ['mytag','sel']); $a=$mw->ROText(height=>2)->pack; $a->insert('end','foo'); $a->focus; $rot->insert('end', ' is baz'); $a=$mw->ROText(height=>2)->pack; $a->insert('end','foo'); $a->focus; MainLoop;
..which means that the Windows port will always be slightly broken -- the ->focus() stuff is just an indication of this. Anyways, hope this helps.#!/usr/local/bin/perl use Tk; use Tk::ROText; my $mw = MainWindow->new(); for (1..3) { $a = $mw->ROText(height=>2)->pack; $a->focus; $a->insert('end','foo',['sel']); $a->focus; } MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: RE: RE: Waking up text select
by Anonymous Monk on Oct 14, 2000 at 03:11 UTC |