On Fri, 23 Jan 2004 20:49:07 +0100
Toon Verstraelen <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I'm trying to implement a File open dialog box, using the 
> gtk.FileSelection dialog box. Is it possible to automaticaly restrict 
> the listed files to those having a certain extension? (like .txt)
> I'v already been searching in "PyGTK 2.0 Reference Manual v1.8" and in
> the PyGTK FAQ, but I can't find a solution.
>

Try something like:

popup=gtk.FileSelection('title')
# customize here                
popup.show_all()
popup.complete('*.txt')

Note you have to put the complete() after the show_all(). If you put it
before, then you'll need to hit 'tab' to get the same effect.

Regards,

Chris 
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to