Removing All Traces of Drawn Widgets From Ruby/Tk Canvas


#1

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 B.

removed_email_address@domain.invalid
removed_email_address@domain.invalid: MS Messenger
dbailey7: AOL IM
db7bd: Yahoo IM
220816592: ICQ