| |||||||||||
How To refresh a canvas Posted by Achilles (Achilles), 30 August 2004 can some 1 plzzzzzzzzz help me ....... I need to refresh my canvas widget , which is in a frame , after some operation ( each time i open a new file ) ............i think there's a simple command for this but I am not able to figure it out ................... help needed urgent Posted by admin (Graham Ellis), 31 August 2004 You're probably looking for update idletasks which will update your display with immediate effect rather than waiting for all processing to finish. Unless you use this command, your display can get out of date - especially in expectk applications. Footnote - I make a promise to review all questions within 24 hours of them being posted. Sometimes (as in this case), you'll be lucky and be answered quicker ... but in general this board should not be relied upon for urgent responses Posted by Achilles (Achilles), 31 August 2004 Graham UPDATE is for getting new items to canvas along with old ones ........... here what I want is that the old items on my canvas ( mainly lines ) should get cleared up for new items ( lines again ) to be put up ................................... Posted by admin (Graham Ellis), 1 September 2004 OK - so you want to delete all the existing items off the canvas rather than simply add and change existing ones? Sorry - I did n't get that from the original question. Try.canvasname delete all where .canvasname is the name of the canvas widget. Note a) You may still need to update idletasks as well (as a second operation) b) If you're wanting to draw (for example) one image after another on the same set of axes, you would do better to mark each of the changeable items you draw with a tag, then just delete the tagged items. This way you won't have to keep redrawing the structure of your graph - just the content. This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |