[Tutor] Tkinter Copy/Paste/Cut functionalities

Alan Gauld alan.gauld at yahoo.co.uk
Sat Feb 4 05:39:25 EST 2017


On 04/02/17 02:34, Pooja Bhalode wrote:

> I came across some snippets of the code to do this but using a self class.

I'm not sure what you mean by a "self class"?

> I was wondering if some one could help me create these functionalities in a
> manner similar to the following code. (similar to the Quitcommand
> function).

See my reply to your other post.

> Another question I had, was how to make the status bar text as a variable
> such that it keeps on displaying what is going on in the program?

Its always best to keep separate questions in separate
posts - it makes searching the archives easier in the
future. However,...

That depends on what you want to show in the Status bar. A Status
bar normally includes showing help text when the mouse moves over
widgets and the status of any component that the cursor enters.
That sounds different to what you want?

You may be able to use a StriVar variable linked to an Entry on
the status bar, or maybe even a Label(can a Label text link to
a StrVar? I'm not sure). Alternatively ifv your code controls
where the variable gets changed(as it should) then simply update
the status bar every time you change that variable. This is one
case where a setX type function becomes worthwhile. Then only
change X by calling setX()...

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list