fCheckB of TGFileDialog

Hi,

According to the document for TGFileDialog (http://root.cern.ch/root/html522/TGFileDialog.html), the fCheckB member is for set on/off file overwriting for Open dialog, but it seems to me that it’s for selection of “Multiple files”.

By the way, are there any ways to see whether the checkbox is on other than to test the contents of TGFileInfo.fFilename and TGFileInfo.fFileNamesList?

Yours,
Kazuyoshi

Hello Kazuyoshi-san,

fCheckB has two functions, depending on the usage of TGFileDialog (see EFileDialogMode dlg_type parameter on TGFileDialog constructor):
If TGFileDialog is used to save file (dlg_type = kFDSave), fCheckB is used as flag for file overwriting.
If TGFileDialog is used to open file (dlg_type = kFDOpen), fCheckB is used as flag for multiple files selection.

Cheers, Bertrand.

Dear Bertrand-san,

Thanks for your explanation.

[quote=“bellenot”]fCheckB has two functions, depending on the usage of TGFileDialog (see EFileDialogMode dlg_type parameter on TGFileDialog constructor):
If TGFileDialog is used to save file (dlg_type = kFDSave), fCheckB is used as flag for file overwriting.
If TGFileDialog is used to open file (dlg_type = kFDOpen), fCheckB is used as flag for multiple files selection.[/quote]

Ah, I see. :smiley: And that should be at least a part of the reason why the button doesn’t have a self-explanatory name! I’ve never used it for saving but opening…

Yours,
Kazuyoshi