DirectoryPopup Method
The DirectoryPopup method displays a directory/folder selection dialog in the center of the current frame.
The dialog lets users select a directory using a tree view. Browsing for a directory starts in the current working directory (see
WorkingDirectory Attribute). The current working is not changed by the method.
The dialog contains an OK button and a Cancel button.
The DirectoryPopup method may be invoked from a 4GL procedure or method only when the 4GL procedure or method has been invoked from a user frame.
This method has the following syntax:
integer = DirectoryPopup([messagetext = nvarchar(256), ]reply = StringObject)
This method has the following parameters:
messagetext
Contains the text that is displayed in the dialog’s title bar
reply
(Required) When the user selects a directory in the dialog, the full path of the selected directory is returned in the reply parameter.
The method returns PU_OK if the user clicks the OK button and PU_CANCEL if the user clicks the Cancel button. For example:
ON CLICK change_dir_btn =
DECLARE
reply = StringObject;
ENDDECLARE
{
// Change the current working directory if user selected one
IF CurExec.DirectoryPopup(messagetext= 'New working directory', reply=reply) = PU_OK THEN
CurSession.WorkingDirectory = reply.Value;
ENDIF;
}
Descriptions of system constant values and their numeric equivalents are listed in
Pop-up Reply Codes.
Last modified date: 12/20/2023