Thread
:
Shaped widgets? (transparent background)
View Single Post
darethehair
2008-10-24 , 14:53
Posts: 273 | Thanked: 104 times | Joined on Mar 2007 @ Manitoba, Canada
#
35
While we are waiting (hopefully) for a solution to this matter, I was wondering if it was possible to have the transparent widgets respond to *other* events e.g. mouse clicks, mouse drags, focus, etc.?
I am a total newbie at this stuff, but I tried adding this code to my app and it was (apparently) ignored:
self.connect("button-press-event", self.toggle_text)
self.connect("drag-begin", self.toggle_text)
self.connect("enter-notify-event", self.toggle_text)
self.connect("focus", self.toggle_text)
def toggle_text(self, widget, event):
if text_flag == "on":
text_flag = "off"
else:
text_flag = "on"
self.update()
return
Even though I could click, drag, etc the widget, it didn't appear as though my 'text_toggle' module was being called. I also tried adding this:
self.add_events(gtk.gdk.KEY_PRESS_MASK |
gtk.gdk.POINTER_MOTION_MASK |
gtk.gdk.BUTTON_PRESS_MASK |
gtk.gdk.SCROLL_MASK)
...but that didn't work either. You folks are a lot smarter than me, so what am I doing wrong? Or is this another limitation?
Thanks
Quote & Reply
|
darethehair
View Public Profile
Send a private message to darethehair
Find all posts by darethehair