CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
tk text box in Tk

 



izzy
stranger

Dec 27, 2000, 8:27 AM

Post #1 of 4 (1069 views)
tk text box in Tk Can't Post

I am attempting to create an option to right click in a text widget. but for some reason the default right click causes a menu containing "file, edit, search, view" to pop up. Is there any way i could get rid of this default?



BigRich
Novice

Jan 3, 2001, 8:40 PM

Post #2 of 4 (1051 views)
Re: tk text box in Tk [In reply to] Can't Post

I'm not 100% sure but I think it's callbacks (Tk::callbacks) that would allow you to specify what code to execute for a rightclick.

BigRich





izzy
stranger

Jan 4, 2001, 7:12 AM

Post #3 of 4 (1049 views)
Re: tk text box in Tk [In reply to] Can't Post

I know that i can do it with a callback, but the standard "text" widget defines a right click and therefore i would need to remove it from the .pm file. the fall back is that if i use this on another machine that the pm file was not modified it wont work right.



perlplexer
Deleted

Jan 4, 2001, 7:48 AM

Post #4 of 4 (1048 views)
Re: tk text box in Tk [In reply to] Can't Post

let's say $txt is your Tk::Text widget, then you can do:

$txt->bind('Tk::Text', '<3>', '');

This will undefine the 'right mouse button click' binding for all Tk::Text widgets on the MainWindow.

--perlplexer

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives