Removing All Traces of Drawn Widgets From Ruby/Tk Canvas

D

David Bailey

Greetings Ruby Community:

Question: How do I effectively erase a filled rectangle to reveal the
RubyTk canvas' background "color" beneath it? I'm having a tough time
trying to "remove' all traces of the filled widgets that I've drawn.

Details: I created a TkcRectange on a TkCanvas using a fill option color
of, say, 'antique white'. I then needed to "remove" the rectangle, but
when I wrote over it without the fill option specified, thinking that
that would "erase" the original rectangle, it didn't and instead left
the first rectangle's color in place, inferring that the background
"color" is transparent. So I have temporarily been using color 'grey83'
to overwrite my rectangles to get as close as possible to the background
grey of the canvas. And, hey, nobody wants to embody their ignorance in
code! I am using Ruby 1.8.2 under Windows 2000 Professional.

Note: I am new to Ruby, but I have been thumbing through the pickaxe
book, and reading through various Ruby web resource pages, (for a few
days now, I am almost embarrassed to admit :)>) ), all to no avail. So
far, I have not as yet been able to figure out how I can reveal that
oddish grey color of the RubyTk canvas after I write over it with
various widgets. Any help or direction on this problem will be greatly
appreciated.

Best regards,

David Bailey

(e-mail address removed)
(e-mail address removed): MS Messenger
dbailey7: AOL IM
db7bd: Yahoo IM
220816592: ICQ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top