MathGroup Archive 2008

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

Search the Archive

Re: button to load files from a window

  • To: mathgroup at
  • Subject: [mg85424] Re: button to load files from a window
  • From: "Steve Luttrell" <steve at>
  • Date: Sun, 10 Feb 2008 05:14:43 -0500 (EST)
  • References: <fojr1e$ger$>

Based on various responses that I got to my question "FileNameSetter button 
return state" on this newsgroup on 16th December 2007, here is a code 
fragment that I wrote which does what you want:

filename = "*.*";

 If[# =!= $Canceled, filename = #;] &[
  SystemDialogInput["FileOpen", filename, WindowTitle -> "Load..."]],
 Method -> "Queued"]

Stephen Luttrell
West Malvern, UK

"Russo, Peter (10170)" <peter.russo at> wrote in message 
news:fojr1e$ger$1 at
>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.
> ===================================================================== 

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