Before I start moving them into dark corners of the canvas - is there a way
to hide/show Tkinter canvas items without having to maintain their original
position externally? All I've found so far is sortvisu.py in the demos that
toggles their coordinates between (0,0,0,0) and the real position/size.
Thanks,
Peter 1 4550
Peter Otten wrote: Before I start moving them into dark corners of the canvas - is there a way to hide/show Tkinter canvas items without having to maintain their original position externally? All I've found so far is sortvisu.py in the demos that toggles their coordinates between (0,0,0,0) and the real position/size.
Thanks, Peter
Not that I know of, and there's apparently nothing like that in the tcl/tk
manual pages. The only thing I can think of is to configure the fill and/or
outline for the items to '', making them invisible. But:
- you have to remember their original fill/outline outside the canvas
- bindings on the items still fire when they are invisible, which may not be
what you want...
HTH
--
- Eric Brunel <eric dot brunel at pragmadev dot com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: pavel.kosina |
last post by:
It seems to me that in my "again and again repainting canvas" script the
rendering is slowing down as the time goes.
It is visible even after 10 seconds.
Any idea why?
--
geon
The exception is rule.
|
by: syed_saqib_ali |
last post by:
Please take a look at and run the code snippet shown below.
It creates a canvas with vertical & Horizontal scroll-bars.
If you shrink the window to smaller than the area of the canvas, the
scroll-bars work as advertised. That's great.
However, if you click the Left Mouse button, it calls code which
expands the width of the canvas by 100 pixels. The area being viewed
expands correspondingly..... BUT I DON'T WANT IT TO!!
|
by: Tuvas |
last post by:
I've been trying to use a canvas to display different pictures on a
Tkinter interface. However, it doesn't seem to update the information.
Ei, I have something like this.
canvas=Canvas(master,blah...)
canvas.pack()
def change_pic(path):
global pic
image=Image() #I'm using PIL to use the images, but I
|
by: Dean Allen Provins |
last post by:
I need to determine the size of a canvas while the process is running.
Does anyone know of a technique that will let me do that?
Thanks,
Dean
|
by: dug |
last post by:
Hi,
I have a small program that moves some shapes around a tkinter canvas.
Is there any way to save the output in a movie file, maybe mpeg?
Thank you,
Douglas
| |
by: Davy |
last post by:
Hi all,
I have written a simple Tkinter program, that is draw a rectangle in a
canvas, when I press Up key, the rectangle move up. But the program
seems work not properly? My environment is Python2.5+PythonWin.
##----------------------
from Tkinter import *
class MyApp:
|
by: Peter Pearson |
last post by:
Tkinter makes it very easy to drag jpeg images around on a
canvas, but I would like to have a "target" change color when
the cursor dragging an image passes over it. I seem to be
blocked by the fact that the callbacks that might tell the
target that the mouse has entered it (<Enter>, <Any-Enter>,
even <Motion>) aren't called if the mouse's button is down.
What am I missing? Have I failed to find the right Tkinter
document? Is Tkinter...
|
by: joshdw4 |
last post by:
I hate to do this, but I've thoroughly exhausted google search. Yes,
it's that pesky root window and I have tried withdraw to no avail. I'm
assuming this is because of the methods I'm using. I guess my question
is two-fold.
1) How do I get rid of that window?
2) Any comments in general? I am just learning python (and coding with
classes), so I'm sure there are things I should pound into my head
before I learn bad habits.
Here's the...
|
by: Eric_Dexter |
last post by:
I saw this (close to this anyway) lieing around on the internet and
was wanting to use it to define a start point exc but I need the
graphics to stay within a set y coords and I am not realy sure how to
do that. I have no idea on how to bind a min/max y to it. (the
concept is inspired by the java csound blue).
#!/usr/bin/python
from Tkinter import *
import csoundroutines as cs
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |