#129 macro function for file or folder selection

open
nobody
None
5
2008-07-08
2008-07-08
Anonymous
No

A macro function with following requirements:

"get_filename_dialog(<message_title>, <start_dir>, <filter>, <file_or_dir>, <only_existing>)"

which does NOT open another file in NEdit, but simply presents the user a dialog window similar to the file open dialog, from which the user can choose a file or folder name, which is then returned by the function.

Parameters:

<message_title> : A text string which is displayed in the
window title of the dialog
(e.g. "Choose file/folder...")

<start_dir> : A path to the folder in which the tree
view display of the dialog should start

<filter> : Filter expression, which restricts the
display and selection to certain naming
requirements (e.g. "*.vhd|*.vho|*.v")
The user should only be allowed to
choose or enter a file/folder name that
conforms to the filter, otherwise a
message should inform the user of this
restriction.

<file_or_dir> : 1 -> User shall select a FILE name
0 -> User shall select a FOLDER name

<only_existing> : 1 -> User can only choose from exis-
ting files/folder
0 -> User can enter arbitrary (non-
existing file/folder name)

Return value:
The name of the selected/enterd file/folder name or
an empty string if user cancelled the dialog

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks