473,383 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Canvas items into widgets?

I have a "tooltip" class that is used like

Lab = Label(Sub, text = "Temp:")
Lab.pack()
Tooltip(Lab, "The temperature of the reactor core")

When the mouse pointer is placed over the "Temp:" label the associated
message pops up in a small window near the pointer.

I want to use the same thing with a canvas item, but the "create_x" calls
return an ID number not a widget 'handle' like Label() does. Is there a way
to turn these IDs into widgets? I mean the ovals and rectangles are,
technically, widgets already, aren't they? I don't think the tag_bind stuff
will quite work (but I don't fully grasp the concept, except in cases where
you want to do something like drag the items around on the canvas) since
each item will have a different message, like, for example, each point on a
graph will have a tooltip that reports what the temperature of that point
was.

The concept:

Rec = can.create_rectangle(<small red rectangle>)
Wig = (Then a miracle occurs)
Tooltip(Wig, "1500C - She's gonna blow!!")
Thanks!

Bob :)
May 23 '06 #1
0 789

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Oz Mortimer | last post by:
Hi, Is there any way that I can scroll a canvas - i.e. if there are too many items on the canvas you can still access by pressing down. I know Form does this (apparently) but I need to do it...
0
by: Mickel Grönroos | last post by:
Hi, I'm trying to put an Tkinter.Entry of fixed size onto a specific location on a canvas using the place manager. The idea is that one can double-click a rectangle object on a canvas to get an...
6
by: Gary Richardson | last post by:
Is there a simple way of causing the size of a canvas to change as the window is resized when using the Grid geometry manager? Setting sticky='NESW', as in the following code, doesn't work though...
1
by: Peter Otten | last post by:
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...
2
by: Askari | last post by:
Hi, I do a "perso"widget where have two scrolls (one vertical, one horizontal) for a canvas. When, the first time, I added widget in the canvas, the scroll self-ajust and when I move scrollbar,...
1
by: Eric Wong | last post by:
Using Tkinter, I have a Canvas with vertical Scrollbar attached. At runtime, I dynamically create Checkboxes on the Canvas, each one on a different row. When I add a lot of Checkboxes, instead of...
5
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
5
by: Andrew Poulos | last post by:
Is there a right/best way to draw an ellipse using Canvas? (With VML there's the v:oval element which makes the exercise trivial). I tried drawing a 360 degree arc (a circle) and then scaling it...
1
by: Gigs_ | last post by:
Hi all! I have just finished my tkinter text editor, learning tkinter purpose. Now I want to learn canvas so I want to make my paint program, I think that this will be the best to do over...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.