MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: button to load files from a window

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85417] Re: [mg85395] button to load files from a window
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Sun, 10 Feb 2008 05:11:07 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200802090912.EAA16641@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

You say "load a file", but it's unclear just what you mean by that.

If what you want to do is open a Mathematica notebook, then the 
following will do it:

   Button["Open notebook", NotebookOpen[SystemDialogInput["FileOpen"]]]

To begin in a particular directory, include the optional 2nd argument to 
SystemDialogInput, for example:

   Button["Open notebook",
     NotebookOpen[SystemDialogInput["FileOpen", "E:\\temp\\"]]]

(You may need to adjust the form of that 2nd argument depending on your 
operating system.)

Russo, Peter (10170) wrote:
> I am trying to make a button to load a file but that allows you to use a
> window to browse through the directory tree ( like a C# winform or when
> the window that pops up when go File->Open in the Mathematica front end
> ) and click on a file.  So, I suppose the button should contain the
> command "ToFileName[]" as the command to load the file.  However, is
> there a command for a browser window or is there a way to construct one
> =3F
> 
> 
> 
> 
> 
> Peter
> 
> 
> 
> 
> --------------------------------------------------------------------------- ---
> NOTICE: Protiviti is a leading international provider of independent internal audit and business and technology risk consulting services. =
> Protiviti is not licensed or registered as a public accounting firm and does=
>  not issue opinions on financial statements or offer attestation services.
> 
> 
> This electronic mail message is intended exclusively for the individual or entity to which it is addressed. This message, together with any attachment , may contain confidential and privileged information.  Any views, opinions or conclusions expressed in this message are those of the individual sender and do not necessarily reflect the views of Protiviti Inc. or its affiliates.  Any unauthorized review, use, printing, copying, retention, 
> disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email message to the sender and delete all copies of this message. Thank you.
> =====================================================================
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Part or Partition or Split or Extract or ...... ????
  • Next by Date: Re: button to load files from a window
  • Previous by thread: button to load files from a window
  • Next by thread: Re: button to load files from a window