' gambas class file
PUBLIC foto AS NEW String[]
PUBLIC rutafoto AS String[]
PUBLIC SUB _new()
END
PUBLIC SUB reinicio()
foto.Resize(0)
rutafoto.Resize(0)
END
PUBLIC SUB Form_Open()
ME.Center()
PictureBoxfoto.Picture = Picture["icon:/64/people"]
END
PUBLIC SUB PictureBoxfoto_MouseDown()
PictureBoxfoto.Stretch = TRUE
Dialog.Title = "Seleccione un archivo para abrir"
Dialog.Path = User.Name
Dialog.Filter = ["*.jpg", "JPG", ".png", "PNG", "*.bmp", "BMP"]
IF NOT Dialog.OpenFile() THEN
PictureBoxfoto.Picture = Picture[Dialog.Path]
''variable global que controla la ruta donde esta la imagen
rutafoto = Replace$(Dialog.Path, " ", Chr$(64) & " ")
END IF
END
PUBLIC foto AS NEW String[]
PUBLIC rutafoto AS String[]
PUBLIC SUB _new()
END
PUBLIC SUB reinicio()
foto.Resize(0)
rutafoto.Resize(0)
END
PUBLIC SUB Form_Open()
ME.Center()
PictureBoxfoto.Picture = Picture["icon:/64/people"]
END
PUBLIC SUB PictureBoxfoto_MouseDown()
PictureBoxfoto.Stretch = TRUE
Dialog.Title = "Seleccione un archivo para abrir"
Dialog.Path = User.Name
Dialog.Filter = ["*.jpg", "JPG", ".png", "PNG", "*.bmp", "BMP"]
IF NOT Dialog.OpenFile() THEN
PictureBoxfoto.Picture = Picture[Dialog.Path]
''variable global que controla la ruta donde esta la imagen
rutafoto = Replace$(Dialog.Path, " ", Chr$(64) & " ")
END IF
END
Me bota este error
y la consola me bota este mensaje
(Imagen:1751): Gtk-CRITICAL **: gtk_file_chooser_default_set_current_name: assertion `impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER' failed
Plis, una ayuda para poder insertar una foto al hacer clic sobre el picturebox desde un archivo.
Gracias.