Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>mx_popdir() - popup a resizeable subdirectory pick list</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     mx_popdir() - popup a resizeable subdirectory pick list
  Usage:    <string> = mx_popdir(<r1>,<c1>,<r2>,<c2>,<spec>,[<attrib>])
  Params:   integer <r1> - the top row number
            integer <c1> - the left column number
            integer <r2> - the bottom row number
            integer <c2> - the right column number
            string <spec>- the drive and directory specifier
            integer <attrib> - the color to use for the window, optional,
            if left off, then Clipper's foreground color is used for the
            window, and the enhanced color is used for the highlight.

  Returns:  a string equal to the directory name picked, or a null if no
            directory picked or error.

 ---------------------------------- Example ---------------------------------

                 dirspec = "C:\"
                 choice = mx_popdir(10,10,20,50,dirspec)
                 if (m_data(30) != -9 .or. choice != "")
                      chdir(choice)
                 else
                      return
                 endif

  Example2: This next example uses the @ sign in front of the
            row/column coordinates so that mx_popdir() can stuff the
            new row column coordinates of the window if the user moves
            or resizes the window.

                 public trow, tcol, brow, bcol
                 trow = 10
                 tcol = 10
                 brow = 20
                 bcol = 50

                 dirspec = "C:\"
                 choice = ;
                 mx_popdir(@trow,@tcol,@brow,@bcol,dirspec)

                 if (choice != "")
                      chdir(choice)
                 else
                      return
                 endif

  Note:     Mx_popdir() returns a fully qualified path name. If you
            specify to display all directories on drive C:\DATA, and the
            user selects the directory 'CLIENT', then the return directory
            name would be C:\DATA\CLIENT.

            Mx_popdir() is simply a front end to the mx_choice()
            function. mx_popdir() builds an array of directory names
            using filecount() and findfirst(), and then passes it along to
            mx_choice() so the user can pick from the list with mouse
            support. mx_popdir() returns the identical m_data() values
            that mx_choice() does, and all the key and mouse functions
            are defined in the mx_choice() documentation. The only extra
            piece of information that mx_popdir() returns is an extra
            error return value in the Mouse Message Area 30
            (m_data(30)). The extra error message is -9 which means no
            directories were found in the supplied drive:path specifier.

            You can use the same m_frame() and m_data() specifications
            that apply to the mx_choice() function.

  Note:     The Clipper source code to mx_popdir() is available to you
            for modification on the source disk in the file
            c_mx_dir.prg.


See Also: m_popdir() m_choice() mx_choice() m_popfile()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson