Tim Evans schrieb:
> [email protected] wrote:
>> Dear all,
>> I cannot find any information how to solve the following problem:
>>
>> In a window I have an entry. In order to support the user when writing 
>> into this entry I display a gtk.Window(gtk.WINDOW_POPUP) that looks like 
>> a tooltip underneath the entry whenever the user enters something wrong.
>>
>> My problem is that the popup window stays on top of any window and not 
>> only my application.
>>
>> How can I tell pygtk that the popup should always be on top of my 
>> application but should not be on top of other windows?
> 
> Assuming your dialog window is 'w' and your popup window is 'p', do this 
> before showing 'p':
> 
>    def configure_popup(popup, parent):
>        popup.window.set_keep_above(False)
>        popup.set_transient_for(parent)
> 
>    p.connect_after('map', configure_popup, w)
> 
> This should, at least on win32 where I tested it, give you a popup 
> window that stays above the specific parent window rather than everything.
> 

Hello Tim,
I am on Ubuntu 9.04 (run in VirtualBox from Windows 7) and your code 
does not work for me. Maybe I miss some detail. This is what I have:

...
self.balloon = gtk.Window(gtk.WINDOW_POPUP)
def configure_balloon(balloon, parent):
     balloon.set_keep_above(False)
     balloon.set_transient_for(parent)
     balloon.set_destroy_with_parent(True)

self.balloon.connect_after('map', configure_balloon, 
self[PropertyDialogView.top])
...

Do I mess something up by calling hide_all, show_all, move or resize 
methods of self.balloon afterwards?

By the way, the code that I had before for declaring the popup window 
was just:

self.balloon = gtk.Window(gtk.WINDOW_POPUP)
balloon.set_transient_for(self[PropertyDialogView.top])
balloon.set_destroy_with_parent(True)

and it behaved just the same.

Do you have more ideas? I appreciate you help very much.
Thanks,
freddy

        
                
___________________________________________________________ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: 
http://mail.yahoo.de
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to