Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

(yakko: ctrl-u addition) Re: Perl/Tk Chatterbox Client

by yakko (Friar)
on Jan 22, 2001 at 01:34 UTC ( [id://53380]=note: print w/replies, xml ) Need Help??


in reply to Perl/Tk Chatterbox Client

Great client!

Here's some small bits to add if you like using ^U to get rid of the text in the input widget...

Around line 541, you originally have:

$Inputfield->bind("<Return>", \&Say_Click); $Inputfield->bind("<Control-Return>", \&Msg_Click); $Inputfield->bind("<Tab>", \&completeName);
insert the ^U binding after the statements above:
$Inputfield->bind("<Control-u>", \&clearentrybox);
and around line 682, between the end of the Msg_Click sub and the beginning of the completeName sub, I put my ^U subroutine:
###################################################################### +########## # # clearentrybox # # clears the entry box on ^U # sub clearentrybox { $Inputfield->delete(0,'end'); }
So far, so good here on my system... a perusal of Tk::Text didn't reveal conflicts with normal keys...

(Update: Added context to make locating the spots to put the code a tad easier)

--
Me spell chucker work grate. Need grandma chicken.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://53380]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-25 07:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found