|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
About the filechooserbuttonDear all,
I am creating a gui with glade and I need to use a filechooserbutton (I think)... What I want back is the name of the file I selected. Looking at the picture attached, on the bottom-left of my gui you could read "aorta.vti". And I want to save (in my code written in Python) a variable (let's say img) as aorta (or aorta.vti). Is that possible? And if this is not the best way, how can I get what I wanna get? Let me explain my target: I wanna insert a name (I can also write it) in the gui and then I want to pass it to my Python code. How can I do that? Thanks a lot for help, samuele _______________________________________________ Glade-users maillist - Glade-users@... http://lists.ximian.com/mailman/listinfo/glade-users |
|
|
Re: About the filechooserbuttonSure, a filechooserbutton will display the selected filename on the
button sometimes with an icon on it, you can set it up to a previously saved value or initial value at startup time. When the user presses the button a dialog will come up, when the dialog finishes if the file has changed, you'll recieve a signal via the filechooser interface that the button implements. You can add a GtkFileFilter to the chooser so that it will only accept png or whatever you decide (currently though you can NOT use the filefilter in Glade, since there is still no useful way to set it up through Glade). Cheers, -Tristan On Mon, Oct 26, 2009 at 1:21 PM, Zampini Samuele <samuele.zampini@...> wrote: > Dear all, > > I am creating a gui with glade and I need to use a filechooserbutton (I think)... > What I want back is the name of the file I selected. > Looking at the picture attached, on the bottom-left of my gui you could read "aorta.vti". > And I want to save (in my code written in Python) a variable (let's say img) as aorta (or aorta.vti). > > Is that possible? > And if this is not the best way, how can I get what I wanna get? Let me explain my target: I wanna insert a name (I can also write it) in the gui and then I want to pass it to my Python code. > How can I do that? > > Thanks a lot for help, > > samuele > _______________________________________________ > Glade-users maillist - Glade-users@... > http://lists.ximian.com/mailman/listinfo/glade-users > Glade-users maillist - Glade-users@... http://lists.ximian.com/mailman/listinfo/glade-users |
|
|
R: About the filechooserbuttonAnd what about, for my purpose, using simply a text entry?
I think it works better. But does someone have a easy example about using the Text Entry? Thanks a lot, samuele ________________________________________ Da: Tristan Van Berkom [tristan.van.berkom@...] Inviato: lunedì 26 ottobre 2009 16.51 A: Zampini Samuele Cc: glade-users@... Oggetto: Re: [Glade-users] About the filechooserbutton Sure, a filechooserbutton will display the selected filename on the button sometimes with an icon on it, you can set it up to a previously saved value or initial value at startup time. When the user presses the button a dialog will come up, when the dialog finishes if the file has changed, you'll recieve a signal via the filechooser interface that the button implements. You can add a GtkFileFilter to the chooser so that it will only accept png or whatever you decide (currently though you can NOT use the filefilter in Glade, since there is still no useful way to set it up through Glade). Cheers, -Tristan On Mon, Oct 26, 2009 at 1:21 PM, Zampini Samuele <samuele.zampini@...> wrote: > Dear all, > > I am creating a gui with glade and I need to use a filechooserbutton (I think)... > What I want back is the name of the file I selected. > Looking at the picture attached, on the bottom-left of my gui you could read "aorta.vti". > And I want to save (in my code written in Python) a variable (let's say img) as aorta (or aorta.vti). > > Is that possible? > And if this is not the best way, how can I get what I wanna get? Let me explain my target: I wanna insert a name (I can also write it) in the gui and then I want to pass it to my Python code. > How can I do that? > > Thanks a lot for help, > > samuele > _______________________________________________ > Glade-users maillist - Glade-users@... > http://lists.ximian.com/mailman/listinfo/glade-users > Glade-users maillist - Glade-users@... http://lists.ximian.com/mailman/listinfo/glade-users |
| Free embeddable forum powered by Nabble | Forum Help |