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_popfile() - popup a resizeable file pick list</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     mx_popfile() - popup a resizeable file pick list
  Usage:    <string> = mx_popfile(<r1>,<c1>,<r2>,<c2>,<fspec>,[<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 <fspec>- the drive and file 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 file name picked, or a null if no
            file name picked or error.

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

                 filespec = "C:\*.prg"
                 choice = mx_popfile(10,10,20,50,filespec)
                 if (choice != "")
                      mx_view(5,5,20,75,choice)
                 else
                      return
                 endif

  Example2: This next example uses the @ sign in front of the
            row/column coordinates so that mx_popfile() 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

                 filespec = "C:\*.*"
                 choice = ;
                 mx_popfile(@trow,@tcol,@brow,@bcol,filespec)

                 if (choice != "")
                      fcopy("C:\"+choice,"A:"+choice)
                 else
                      return
                 endif

  Note:     Mx_popfile() returns only the file name. It does not append
            the drive or path specifier to the front of the name.

            Mx_popfile() is simply a front end to the mx_choice()
            function. mx_popfile() builds an array of file 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_popfile() 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_popfile() returns is an extra
            error return value in the Mouse Message Area 30
            (m_data(30)). The extra error message is -10 which means no
            files were found in the supplied drive:path specifier that
            match the file specification.

            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_popfile() is available to you
            for modification on the source disk in the file
            c_mx_fil.prg.


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

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