Save file dialog
Posted
#1
(In Topic #1352)
Regular

Posted
Administrator

Code (gambas)
- Me.Center
- 'Cancel was clicked
- 'Save the file using returned Dialog.Path
Enjoy…
gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories
… there is always a Catch if things go wrong!
Posted
Guru

So If Dialog.SaveFile() = True there was an error (cancel was clicked)
It seems kinda counter intuitive but there it is, many other gambas methods work that way too.
You can set Dialog.Path (plus other Dialog properties) before you call it then the dialog opens at that path. then you read Dialog.Path after to get the chosen path.
Have a read of the wiki to learn about Dialog.Title, Dialog.Filter/Dialog.FilterIndex, etc
/comp/gb.qt4/dialog - Gambas Documentation
And if you add the component gb.form.dialog you will get more advanced dialogs with more options…
/comp/gb.form.dialog/dialog - Gambas Documentation
1 guest and 0 members have just viewed this.

