This is as far as I could go with it. I couldn't get it to scroll, but maybe this can get you started.
#!/usr/local/bin/perl use strict; use warnings; use Tk; use Tk::EntryCheck; my $entry_val; my $mw = MainWindow->new; $mw->geometry("500x200"); $mw->title("Value Entry"); my $mf = $mw->Frame()->pack(-side => 'top', -fill => 'x'); my $tf = $mf->Frame(-background => "red")->pack(-side => 'top', -fill =>'x'); my $lf = $mf->Frame(-background => "black")->pack(-side => 'left', -fill => 'y'); my $rf = $mf->Frame(-background => "white")->pack(-side => "right"); $tf->Label(-text => "Value Entry", -background => "red")->pack(-side =>"top"); $lf->Label(-text => "Enter value:", -background => "black", -foreground => "yellow")->pack(-side => "left"); my $entry = $lf->EntryCheck( -validate => "all" )->pack(-side => "left"); my $copy_button = $lf->Button(-text => "Copy Value", -command => \&copy_values)->pack(-side => "right"); my $clear_entries = $rf->Button(-text => "Clear Value", -command => \&clear_entries)->pack(-side => "top"); my $paste_entries = $rf->Text(-background => "black", -foreground => "green")->pack(-side => "top"); sub handleEvent { my ($new_val, $chars_2_change, $curr_val, $index, $action) = @_; if (!$chars_2_change && $action != -1) { return; } print $new_val."\n"; } sub clear_entries { $paste_entries->delete('0.0', 'end'); } sub copy_values { my $copied_text = $entry->get(); $paste_entries->insert("end", $copied_text); } MainLoop;

In reply to Re: using TK Text (or something similar), is there a simple way to get the -validate=>"all" functionality in TK Entry? by Khen1950fx
in thread using TK Text (or something similar), is there a simple way to get the -validate=>"all" functionality in TK Entry? by noelgolding

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.