[Gambas-user] close the FileDialog with a DBClick on a file

Bruce Steers bsteers4 at gmail.com
Thu Dec 16 22:40:37 CET 2021


On Thu, 16 Dec 2021 at 20:29, Charlie Reinl <Karl.Reinl at fen-net.de> wrote:

> Am Montag, dem 13.12.2021 um 19:32 -0500 schrieb T Lee Davidson:
> > At any rate, it can be prevented by setting the FileChooser's
> > property ReadOnly=True.
>
> Salut,
>
> still puzzling over what this is good for, that I get this message when
> I DbClick a file displayed in FileChooser.
> "This file already exists." What else ?
> Waiting for enlightenment, don't get it.
>

Consider Dialog.OpenFile() and Dialog.SaveFile()

Dialog.SaveFile is for writing a file and gives warnings if file exists.
Dialog.OpenFile is for reading/loading a file so does not care that file
exists.

Setting ReadOnly = True makes FileChooser behave as Dialog.OpenFile and
ReadOnly =False like Dialog.SaveFile

Hope that makes sense
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20211216/d4e8d681/attachment.htm>


More information about the User mailing list