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 ( #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.


Comment on (yakko: ctrl-u addition) Re: Perl/Tk Chatterbox Client
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2014-09-20 06:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (155 votes), past polls