Dialogs

Dialogs
Using dialogs with wxEuphoria
Functions/Procedures
Subtopics

Dialogs

[func]
color_selector
( atom parent, atom initial )

Category: Dialogs

Returns: Selected color, or zero

This is a wrapper for wxColourDialog. It returns a wxColour object, or zero, if the user clicked the cancel button.


Dialogs

[func]
file_selector
( atom parent, sequence message, sequence info, atom flag )

Category: Dialogs

Returns: Selected file path, or an empty string

Pops up a file selector box. In Windows, this is the common file selector dialog. In X, this is a file selector box with the same functionality. This function is used for both open and save dialogs.

You may supply none or any number of these, but file_selector() will assume they are in this order, so in order to specify a wildcard selection, you must specify the others, even if they are empty sequences.

The path and filename are distinct elements of a full file pathname. If path is empty, the current directory will be used. If filename is empty, no default filename will be supplied. The wildcard determines what files are displayed in the file selector, and file extension supplies a type extension for the required filename.

Flags may be a combination of wxOPEN, wxSAVE, wxOVERWRITE_PROMPT, wxHIDE_READONLY, wxFILE_MUST_EXIST, wxMULTIPLE or 0.

Both the Unix and Windows versions implement a wildcard filter. Typing a filename containing wildcards (*, ?) in the filename text item, and clicking on Ok, will result in only those files matching the pattern being displayed.

The wildcard may be a specification for multiple types of file with a description for each, such as:

    "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"

Dialogs

[func]
font_selector
( atom parent, atom initial )

Category: Dialogs

Returns: Selected font, or zero

This is a wrapper for wxFontDialog. parent is the parent for the dialog (it may be null), and initial is the wxFont object that will be initially selected when the dialog is opened. If a font is selected (the user clicks OK), the new wxFont object is returned, otherwise the return value is zero.