---
name: "SDL_ShowFileDialogWithProperties"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_ShowFileDialogWithProperties"
---

# SDL\_ShowFileDialogWithProperties(3)

Create and launch a file dialog with the specified properties.

## NAME

SDL\_ShowFileDialogWithProperties - Create and launch a file dialog with the specified properties.

## HEADER FILE

Defined in SDL3/SDL\_dialog.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**void SDL\_ShowFileDialogWithProperties(SDL\_FileDialogType type, SDL\_DialogFileCallback callback, void \*userdata, SDL\_PropertiesID props);**

## DESCRIPTION

These are the supported properties:

•  **SDL\_PROP\_FILE\_DIALOG\_FILTERS\_POINTER** :\
   a pointer to a list of  **SDL\_DialogFileFilter**

  structs, which will be used as filters for file-based selections. Ignored\
   if the dialog is an "Open Folder" dialog. If non-NULL, the array of\
   filters must remain valid at least until the callback is invoked.

•  **SDL\_PROP\_FILE\_DIALOG\_NFILTERS\_NUMBER** :\
   the number of filters in the array of filters, if it exists.

•  **SDL\_PROP\_FILE\_DIALOG\_WINDOW\_POINTER** :\
   the window that the dialog should be modal for.

•  **SDL\_PROP\_FILE\_DIALOG\_LOCATION\_STRING** :\
   the default folder or file to start the dialog at.

•  **SDL\_PROP\_FILE\_DIALOG\_MANY\_BOOLEAN** :\
   true to allow the user to select more than one entry.

•  **SDL\_PROP\_FILE\_DIALOG\_TITLE\_STRING** :\
   the title for the dialog.

•  **SDL\_PROP\_FILE\_DIALOG\_ACCEPT\_STRING** :\
   the label that the accept button should have.

•  **SDL\_PROP\_FILE\_DIALOG\_CANCEL\_STRING** :\
   the label that the cancel button should have.

Note that each platform may or may not support any of the properties.

## FUNCTION PARAMETERS

- *type*

  the type of file dialog.

- *callback*

  a function pointer to be invoked when the user selects a file and accepts, or cancels the dialog, or an error occurs.

- *userdata*

  an optional pointer to pass extra data to the callback when it will be invoked.

- *props*

  the properties to use.

## THREAD SAFETY

This function should be called only from the main thread. The callback may be invoked from the same thread or from a different one, depending on the OS's constraints.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_FileDialogType**(3type)](/SDL_FileDialogType/3type.md), **•**(3), [**SDL\_DialogFileCallback**(3type)](/SDL_DialogFileCallback/3type.md), **•**(3), [**SDL\_DialogFileFilter**(3type)](/SDL_DialogFileFilter/3type.md), **•**(3), [**SDL\_ShowOpenFileDialog**(3)](/SDL_ShowOpenFileDialog/3.md), **•**(3), [**SDL\_ShowSaveFileDialog**(3)](/SDL_ShowSaveFileDialog/3.md), **•**(3), [**SDL\_ShowOpenFolderDialog**(3)](/SDL_ShowOpenFolderDialog/3.md)
