## 4.17 FileSelectors

A fileSelector allows users to select a filename interactively. It is a composite widget consists of six frames, two labels, two listboxes, two optional entries and three buttons. This widget uses the gnu glob library and the gnu tilde library (both are included).

### Widget Info

Symbolic widget type | EZ_WIDGET_FILE_SELECTOR
Default class name | "FileSelector"
Default instance name | "fileSelector"

### Subwidgets Info

Instance names of subwidgets are listed below.

                    (           ( filterLabel
                    (           (                         ( iListBox
                    (  frameA-->( filterEntry ...popupA-->( horizontalScrollbar
                    (                                     ( verticalScrollbar
                    (          (           ( directoryLabel
                    (          (           (                    ( iListBox
                    (          ( frameB1-->( directoryListBox-->( horizontalScrollbar
                    (          (                                ( verticalScrollbar
                    (          (           ( fileLabel
                    (          (           (               ( iListBox
     fileSelector-->( frameB-->( frameB2-->( fileListBox-->( horizontalScrollbar
                    (          (           (               ( verticalScrollbar
                    (
                    (          ( selectionLabel
                    (          (                            ( iListBox
                    ( frameC-->( selectionEntry ...popupB-->( horizontalScrollbar
                    (                                       ( verticalScrollbar
                    (          ( okButton
                    ( frameD-->( filterButton
                    (          ( hideButton

### Widget Interface Routines

    void EZ_GetFileSelectorWidgetComponents(EZ_Widget *widget,
                    EZ_Widget **ptnEntry,   EZ_Widget **fileEntry,
                    EZ_Widget **dirListbox, EZ_Widget **fileListbox,
                    EZ_Widget **okBtn,      EZ_Widget **filterBtn,
                    EZ_Widget **cancelBtn);

return the components of a file selector.

`void EZ_SetFileSelectorInitialPattern(EZ_Widget *widget, char *pattern);`

set the glob pattern of a file selector.

`char *EZ_GetFileSelectorSelection(EZ_Widget *widget);`

return the current selection of a file selector.

### Screenshot

### Resources

Config_Option | ResourceName | DefaultValue
EZ_CLASS | class | `"FileSelector"`
EZ_NAME | name | `"fileSelector"`

EZ_X | x |
EZ_Y | y |
EZ_WIDTH | width |
EZ_HEIGHT | height |

EZ_LOCATION | location |
EZ_SIZE | size |
EZ_GEOMETRY | geometry |

EZ_WIDTH_HINT | widthHint | `300`
EZ_HEIGHT_HINT | heightHint | `400`
EZ_SIZE_HINT | sizeHint |

EZ_BORDER_WIDTH | borderWidth | `0`
EZ_BORDER_TYPE | borderType | `none`
EZ_FOCUS_PAD | focusPad | `0`

EZ_PADX | padx | `2`
EZ_PADY | pady | `4`
EZ_IPADX | iPadx | `0`
EZ_IPADY | iPady | `4`

EZ_CALLBACK | N/A | `null null`
EZ_DESTROY_CALLBACK | N/A | `null null`

EZ_FOREGROUND | foreground | `"black"`
EZ_BACKGROUND | background | `"gray74`
EZ_BG_IMAGE_FILE | bgImageFile | `null`
EZ_BG_PIXMAP | N/A | `none`
EZ_HIGHLIGHT_FOREGROUND | highlightForeground |
EZ_HIGHLIGHT_BACKGROUND | highlightBackground |

EZ_BG_IMAGE_FILE_B | bgImageFileB | `null`
EZ_BG_PIXMAP_B | N/A | `none`
EZ_CLIENT_PTR_DATA | N/A | `null`
EZ_CLIENT_INT_DATA | clientIntData | `0`

EZ_GLOB_PATTERN | globPattern | `null`

HTML Documentation Maintainance:`Arturo Espinosa <arturo@nuclecu.unam.mx>`