1. EuGTK - GtkFileChooserDialog

In test15.ex there is a GtkFileChooserDialog that selects a file for reading. But to select a file for writing, there must be a way to type in a new file name. How is that added?

I don't know how to use most of the information under control[GtkFileChooser] in GtkRoutines.e.

new topic     » topic index » view message » categorize

2. Re: EuGTK - GtkFileChooserDialog

Choose one of the following constants:

  GTK_FILE_CHOOSER_ACTION_OPEN, 
  GTK_FILE_CHOOSER_ACTION_SAVE, 
  GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, 
  GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER 

Use it like this:

function Save() 
object dlg = create(GtkFileChooserDialog,"Save this file",win, 
	GTK_FILE_CHOOSER_ACTION_SAVE) 
	set(dlg,"add button","gtk-cancel",-1) 
	set(dlg,"add button","gtk-ok",1) 
if run(dlg) = 1 then  
	-- 
end if 
return 1 
end function 

Lots of other stuff you can do with that dialog: http://library.gnome.org/devel/gtk/unstable/GtkFileChooser.html

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu