ctkDirDialog

        Set up a non-modal dialog to select a subdir

Syntax

                my $db = ctkDirDialog::dirDialog('Select one subdir','./');
                my $db = ctkDirDialog::dirDialog('Select one subdir','./',$wEntry);
                if ($myFolder = ctkDirDialog::getdirDialogResult()) {
                        ## Process selected folder
                } else {
                        ##
                }

Programming notes

Non standard widget!
Class variables
        DTW, DTL, DT, DTOK, DTCancel    work
        dirDialog
        dirDialogSubdir
        dirDialogEntry
Methods
        cleanPath
        createOneDir
        dirDialog
        dirDialogModal
        dirDialogOnCreateSubdir
        dirDialogOnDTCancel
        dirDialogOnDTCancelModal
        dirDialogOnDTOK
        dirDialogOnDTOKModal
        dirDialogOnDTTree
        dirDialogOnDTTreeModal
        getdirDialogResult

Maintenance

        Author: marco
        date:   05.10.2006
        History
                        05.10.2006 mam First draft

dirDialogModal

        This method provides the same functionality as dirDialog
        but in modal mode.

dirDialog

        Set up non-modal dialog
        Arguments
                - title         title
                - start dir     starting folder
                - entry         receiving entry widget, optional
        Return
        - ref to toplevel widget or undef.
        Example :
                $button->configure (-command [sub {
                        my $w =&ctkDirDialog::dirDialogModal;
                        $w->Show;
                        },
                        "Select folder",
                        '.',
                        $entry
                        ]);
        Note: result of the selection must be withdraw with
              ctkDirDialog::getdirDialogResult

getdirDialogResult

        This method returns the value of the selected folder.

cleanPath

        Performs some edit operations on the given folder:
                - eliminate double separators replacing them with a single separator,
                - replace '/' with the separator used by the runnning OS,
                - change case of drive letter to low case.

createOneDir

        This method allocates the given folder using mkdir.
        It returns the return code of mkdir.

Back to index