add_choice


Description:

public void add_choice (string id, string label, string[]? options, string[]? option_labels)

Adds a 'choice' to the file chooser.

Note:

Use [class@Gtk.FileDialog] instead

This is typically implemented as a combobox or, for boolean choices, as a checkbutton. You can select a value using [ method@Gtk.FileChooser.set_choice] before the dialog is shown, and you can obtain the user-selected value in the [signal@Gtk.Dialog: GtkFileChooser:response] signal handler using [method@Gtk.FileChooser.get_choice].

Parameters:

this

a `GtkFileChooser`

id

id for the added choice

label

user-visible label for the added choice

options

ids for the options of the choice, or null for a boolean choice

option_labels

user-visible labels for the options, must be the same length as options