When I use tcl/tk canvas, I hope I could draw some object with transparent color. Can tcl/tk'canvas realize this function? And if it can, how realize it ?
By "transparent" do you mean you want to draw an object that you can't see? If so, set the canvas color and the object color to be the same. If you want to be able to see the object and the object underneath it, maybe you can try a "stipple" pattern? Bob Rashkin
rrashkin@csc.com
It's also possible to create canvas items with a -fill attribute set to the empty string. For example, here's a little "hide and seek" with an invisible rectangle on a canvas:
Code:
canvas .c
pack .c
.c create rect 20 20 50 50 -fill "" -width 0 -tag active
.c bind active <ButtonPress-1> {
puts "You clicked me!"
}
- Ken Jones, President
Avia Training and Consulting
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.