Dear Wise Monks,

I am using the perlplusplugin for a project where a perl/Tk main window needs to be embedded in a netscape application.

Version info:
Linux xxx.yyy.com 2.4.8-26mdk #1 Sun Sep 23 17:06:39 CEST 2001 i686 unknown
This is perl, v5.6.1 built for i386-linux
/usr/local/netscape6.23/run-mozilla.sh /usr/local/netscape6.23/mozilla-bin -v

In order to embed a window in a running Netscape window, I use code like this:

my $mw; my $top = $Plugin::brinfo{xwindow_id}; if ($^O !~ /Win/ && defined($top)) { $mw = MainWindow->new( -use => $top); } else { $mw = MainWindow->new(); $top = undef; }
My problem is that perl/Tk Entry and Text widgets in the embedded window will not get the focus when I click on them. All other sorts of widgets (list boxes and buttons for example) seem to work correctly.

The only way I have been able to work around this: if I drag some other window (which need not be a perl/Tk one) around on top of the netscape window and cause it to lose focus, then the next Entry widget the mouse moves over will usually get the focus.

Does anyone have any suggestions on what could be going wrong and how to handle it? Thanks for your help.


In reply to Perl/Tk in a plugin: Edits won't take focus by tall_man

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.