Skip to content

Initial_Folder - AbstractFileDialog

Determines the starting point for this object

Type: Property
Access: Read/Write
Data Type: String
Parameters: None

Syntax

Property String Initial_Folder
Access Type Syntax
Read Access: Get Initial_Folder to StringVariable
Write Access: Set Initial_Folder to StringVariable/Value

Description

The Initial_Folder property determines the starting point for this object. If no value is assigned, Windows will provide the starting point (the current Windows folder).

Default is current folder.

Sample

This method can be added to a Form object. The developer can also set the form's Prompt_Button_Mode to pb_PromptOn. The user will then be able to click on the form's prompt button or press the prompt (F4) key to pop up the open dialog.

Procedure Prompt
    Boolean bFileSelected
    Handle hoWorkspace
    String sBitmapPath sFileName

    Get phoWorkspace Of ghoApplication To hoWorkspace
    If (hoWorkspace > 0) Begin
        Get psBitmapPath Of hoWorkspace To sBitmapPath
        Get PathAtIndex Of hoWorkspace sBitmapPath 1 To sBitmapPath
    End

    Set Initial_Folder Of oOpenDialog To sBitmapPath
    Get Show_Dialog Of oOpenDialog To bFileSelected
    If (bFileSelected) Begin
        Get File_Name Of oOpenDialog To sFileName
        Set Value To sFileName
        Set Item_Changed_State To True
    End
End_Procedure