Hi Monks

Im using the next code for text box:
my $mp = MainWindow->new(title=>"Project List"); my $mp1 = $mp -> Frame; $mp1->Label( -text=>'For Help...', -font => 'bold', -relief => 'sunken', -height => '1.5', -background => 'lightblue')->pack(-side=>"top",-fill=>"both",- +anchor=>"w"); $mp1 -> pack; my $mp2 = $mp -> Frame; $mp2->Button( -text => 'Cancel', -background => 'lightgreen', -command =>\&Escape)->pack(-side=>"right",qw/-padx 50 -pady 2/ +); $mp2->Button( -text => 'OK', -background => 'lightgreen', -command =>[$mp => 'destroy'])->pack(-side=>"right",qw/-ipadx +8 -pady 2/); $mp2 -> pack; my $mp3 = $mp1 -> Frame; $listbox = $mp3->Scrolled("Listbox", "-width" => 35, "-height" => 20, "-scrollbars" => 'sw', "-background" => 'lightyellow'); #open(FILE,"K:\\SHIHAN\\ENV_LIST.txt") or warn "$!\n"; open(FILE,"K:\\Project_List.txt") or warn "$!\n"; while ($line=<FILE>) { chomp ($line); if ( $line =~ '^[1-9]') { $listbox-> insert('end',"$line");} } close (FILE); $listbox-> bind ('<Motion>',\&getNumFlow); $listbox-> bind ('<Double-1>',sub{getNumFlow(); $mp->destroy;}); $listbox->configure(-yscrollcommand =>['set',$scroll]); $listbox->pack(-side=>'left',-fill => 'both'); $text2 = $mp3->Text('-width'=>40,'-height'=>2)->pack; $mp3 -> pack; MainLoop;

I'm using a '<Motion>' since I can't use any thing else
when I tryed to finde something to react
to a single mouse click I kept getting errors.
Please help me find the right command, since for this even the black book didn't help.

Thanks Ahead
Moked

In reply to a single click in a text box by moked

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.