AFXFileDialog

This class contains a file selection dialog box.


AFXFileDialog(owner, title, pathNameKw, readOnlyKw, tgt=None, sel=0, mode=AFXSELECTFILE_ANY, patterns=*, patternIndexTgt=None)

Constructor that creates a dialog box that always occludes its owner widget when overlapping with the widget. The constructor expects a string keyword for storing the selected file name. If the dialog box allows multiple selection, the string keyword contains comma-separated path names of all selected files.

ArgumentTypeDefaultDescription
ownerFXWindow Parent widget.
titleString Dialog title.
pathNameKwAFXStringKeyword Path name keyword.
readOnlyKwAFXBoolKeyword Read-only keyword.
tgtFXObjectNoneMessage target.
selInt0Message ID.
modeIntAFXSELECTFILE_ANYFile selection mode.
patternsString*File filter patterns.
patternIndexTgtAFXIntTargetNoneIndex used to select a file filter pattern when the dialog box is posted.


AFXFileDialog(title, pathNameKw, readOnlyKw, tgt=None, sel=0, mode=AFXSELECTFILE_ANY, patterns=*, patternIndexTgt=None)

Constructor that creates a dialog box that always occludes the main window when overlapping with the main window. The constructor expects a string keyword for storing the selected file name. If the dialog box allows multiple selection, the string keyword contains comma-separated path names of all selected files.

ArgumentTypeDefaultDescription
titleString Dialog title.
pathNameKwAFXStringKeyword Path name keyword.
readOnlyKwAFXBoolKeyword Read-only keyword.
tgtFXObjectNoneMessage target.
selInt0Message ID.
modeIntAFXSELECTFILE_ANYFile selection mode.
patternsString*File filter patterns.
patternIndexTgtAFXIntTargetNoneIndex used to select a file filter pattern when the dialog box is posted.


AFXFileDialog(owner, title, pathNameTgt, readOnlyKw, tgt=None, sel=0, mode=AFXSELECTFILE_ANY, patterns=*, patternIndexTgt=None)

Constructor that creates a dialog box that always occludes its owner widget when overlapping with the widget. The constructor expects a string target for storing the selected file name. If the dialog box allows multiple selection, the string target contains comma-separated path names of all selected files.

ArgumentTypeDefaultDescription
ownerFXWindow Parent widget.
titleString Dialog title.
pathNameTgtAFXStringTarget Path name target.
readOnlyKwAFXBoolKeyword Read-only keyword.
tgtFXObjectNoneMessage target.
selInt0Message ID.
modeIntAFXSELECTFILE_ANYFile selection mode.
patternsString*File filter patterns.
patternIndexTgtAFXIntTargetNoneIndex used to select a file filter pattern when the dialog box is posted.


AFXFileDialog(title, pathNameTgt, readOnlyKw, tgt=None, sel=0, mode=AFXSELECTFILE_ANY, patterns=*, patternIndexTgt=None)

Constructor that creates a dialog box that always occludes the main window when overlapping with the main window. The constructor expects a string target for storing the selected file name. If the dialog box allows multiple selection, the string target contains comma-separated path names of all selected files.

ArgumentTypeDefaultDescription
titleString Dialog title.
pathNameTgtAFXStringTarget Path name target.
readOnlyKwAFXBoolKeyword Read-only keyword.
tgtFXObjectNoneMessage target.
selInt0Message ID.
modeIntAFXSELECTFILE_ANYFile selection mode.
patternsString*File filter patterns.
patternIndexTgtAFXIntTargetNoneIndex used to select a file filter pattern when the dialog box is posted.


getCurrentPattern()

Returns the current pattern number.


getDirectory()

Returns the current directory.


getFileBoxStyle()

Return file list style.


getFilename()

Returns the file name.


getFilenames()

Returns an empty-string terminated list of selected file names, or 0 if none is selected.


getItemSpace()

Returns the inter-item spacing (in pixels).


getPattern()

Returns the file pattern.


getPatternList()

Returns the list of patterns.


getPatternText(patno)

Returns the pattern text for a given pattern number.

ArgumentTypeDefaultDescription
patnoInt  


getPressedButtonId()

Returns the ID of the button that the user pressed in the dialog box.


getReadOnly()

Returns the read-only state.


getReadOnlyPatterns()

Returns the patterns that force the enabling of the read-only button.


getSelectMode()

Returns the file selection mode.


setCurrentPattern(n)

Sets the current active pattern.

ArgumentTypeDefaultDescription
nInt  


setDirectory(path)

Sets the current directory.

ArgumentTypeDefaultDescription
pathString  


setFileBoxStyle(style)

Sets the file list style.

ArgumentTypeDefaultDescription
styleInt  


setFilename(path)

Sets the file name.

ArgumentTypeDefaultDescription
pathString  


setItemSpace(s)

Sets the inter-item spacing (in pixels).

ArgumentTypeDefaultDescription
sInt  


setPattern(ptrn)

Sets the file pattern.

ArgumentTypeDefaultDescription
ptrnString  


setPatternList(patterns)

Sets the list of file patterns.

ArgumentTypeDefaultDescription
patternsString  


setPatternListMaxVisible(maxVisible)

Sets the maximum number of visible items for the file pattern list.

ArgumentTypeDefaultDescription
maxVisibleInt  


setPatternText(patno, text)

Sets the pattern text for a pattern number.

ArgumentTypeDefaultDescription
patnoInt  
textString  


setReadOnly(state)

Sets the initial state of read-only button.

ArgumentTypeDefaultDescription
stateBool  


setReadOnlyPatterns(patterns)

Sets the patterns that force the display of the read-only button; separate the entries by a newline character

.

ArgumentTypeDefaultDescription
patternsString  


setSelectMode(mode)

Sets the file selection mode.

ArgumentTypeDefaultDescription
modeInt  


show()

Posts the dialog box.

Reimplemented from AFXDialog.


showModal(occludedWindow=None)

Posts the dialog box as a modal dialog box. The dialog box is centered against the given widget or its owner widget if 0 is given.

ArgumentTypeDefaultDescription
occludedWindowFXWindowNoneWidget to be occluded (0 for the owner widget).


shownReadOnly()

Returns True if the read-only button is shown.


showReadOnly(show)

Shows the read-only button.

ArgumentTypeDefaultDescription
showBool