- Selecting directories
- Opening mode of the image picker
fImageSelect (Function) In french: fSélecteurImage Opens the image picker of Windows. The image picker is as follows:
// Select an image file File = fImageSelect("C:\Directories", "File.gif", "Select an image", ... "JPEG (*.JPG)" + TAB + "*.jpg" + CR + "BMP (*.BMP)" + TAB + "*.gif")
Syntax
<Result> = fImageSelect(<Initial directory> , <File selected by default> , <Picker title> [, <Types of files> [, <Option>]])
<Result>: Character string - Full name of the selected file. If multiple files are selected, the names of the selected files are separated by Carriage Returns (CR).
- Empty string ("") if no file was selected.
<Initial directory>: Character string Full or relative path of initial directory (up to 260 characters). This directory name may (or may not) end with "\". The files found in this directory are displayed in the image picker. If this parameter is an empty string (""), the initial directory will be the current directory. <File selected by default>: Character string Name and extension of the file selected by default. If this parameter is an empty string (""), no file will be selected by default. <Picker title>: Character string Caption displayed in the title bar of the image picker. If this parameter is an empty string (""), the title of the current WINDEV window will be displayed. <Types of files>: Optional character string Description of types of files that can be selected. This description has the following format:
<Types Files> + TAB + <List Extensions> [ + CR + <Types Files 2> + TAB + <List Extensions 2>]
- <Types Files>: character string describing the type of file ("BMP (*.BMP;*.RLE)" for example).
- <List Extensions>: extensions corresponding to the described type ("*.BMP;*.RLE" for example).
For example:
"BMP (*.BMP;*.RLE)"+TAB+"*.BMP;*.RLE"+CR+"Icon (*.ICO)"+TAB+"*.ICO"+CR+ "Other"+TAB+"*.GIF;*.TIF;*.JPG"
<Option>: Optional Integer constant (or combination of constants) Options that must be taken into account: | | fPathUNICODE | <Result> will be a Unicode string (by default, fImageSelect returns an Ansi string). | fSelMulti | Opens the file picker in multi-selection mode. The user can select several image files by pressing the "Ctrl" and "Shift" keys. |
Remarks fImageSelect is used to select image files. To select a directory, use fSelectDir. Opening mode of the image picker Only the "Open" button is displayed in the image picker. In order for the "Save" button to be displayed in the image picker, fSelect and fGraphicFilter must be combined (see the example of fGraphicFilter). Business / UI classification: UI Code
This page is also available for…
|
|
|
|