1. getOpenFileName
- Posted by dcole Feb 08, 2011
- 1947 views
filename = getOpenFileName( Window1, -- parent window "e:\\euphoria\\stocks\\", -- no default name { "Text Files", "*.TXT", -- text files "Data Files","*.DAT", "All Files", "*.*" } ) -- everything else
I'm using the above code, When I open the Open Window it shows All Files. If I select "Text Files" in the "Files of type" Combo Box then only the .TXT files show in the window. If I select "Data Files" in the "Files of type" Combo Box then only the .DAT files show in the window.
How can I make it so only .DAT files show at the get go when I first open the Open Window window?
Don Cole
2. Re: getOpenFileName
- Posted by ArthurCrump Feb 08, 2011
- 1906 views
The win32lib documentation for getOpenFileNameEx should have a fourth parameter extra.
Use this paramater to specify the initial filter index.
filename = getOpenFileNameEx( Window1, -- parent window "e:\\euphoria\\stocks\\", -- no default name { "Text Files", "*.TXT", -- text files "Data Files","*.DAT", "All Files", "*.*" }, -- everything else { {ofnFilterIndex,2} } )
3. Re: getOpenFileName
- Posted by DanM Feb 08, 2011
- 1874 views
The win32lib documentation for getOpenFileNameEx should have a fourth parameter extra.
Use this paramater to specify the initial filter index.
filename = getOpenFileNameEx( Window1, -- parent window "e:\\euphoria\\stocks\\", -- no default name { "Text Files", "*.TXT", -- text files "Data Files","*.DAT", "All Files", "*.*" }, -- everything else { {ofnFilterIndex,2} } )
And I *think* the Win32Lib demo, "Generic" has an example of how to use that parameter.
Dan
4. Re: getOpenFileName
- Posted by dcole Feb 09, 2011
- 1816 views
The win32lib documentation for getOpenFileNameEx should have a fourth parameter extra.
Use this paramater to specify the initial filter index.
filename = getOpenFileNameEx( Window1, -- parent window "e:\\euphoria\\stocks\\", -- no default name { "Text Files", "*.TXT", -- text files "Data Files","*.DAT", "All Files", "*.*" }, -- everything else { {ofnFilterIndex,2} } )
Yes Authur,
Your code does put 'Data Files' in the 'Files of type' ComboBox. But he Window still shows all files.
I want it to show only Data Files on open.
Don Cole
5. Re: getOpenFileName
- Posted by dcole Feb 09, 2011
- 1775 views
The win32lib documentation for getOpenFileNameEx should have a fourth parameter extra.
Use this paramater to specify the initial filter index.
filename = getOpenFileNameEx( Window1, -- parent window "e:\\euphoria\\stocks\\", -- no default name { "Text Files", "*.TXT", -- text files "Data Files","*.DAT", "All Files", "*.*" }, -- everything else { {ofnFilterIndex,2} } )
And I *think* the Win32Lib demo, "Generic" has an example of how to use that parameter.
Dan
It dosen't. I found Generic but not getOpenFileNameEx.
Don Cole
6. Re: getOpenFileName
- Posted by DanM Feb 09, 2011
- 1799 views
The win32lib documentation for getOpenFileNameEx should have a fourth parameter extra.
Use this paramater to specify the initial filter index.
filename = getOpenFileNameEx( Window1, -- parent window "e:\\euphoria\\stocks\\", -- no default name { "Text Files", "*.TXT", -- text files "Data Files","*.DAT", "All Files", "*.*" }, -- everything else { {ofnFilterIndex,2} } )
And I *think* the Win32Lib demo, "Generic" has an example of how to use that parameter.
Dan
It dosen't. I found Generic but not getOpenFileNameEx.
Don Cole
Sorry about that, I should have checked, I thought I remembered it to be there, but I see now that it was the "openMultiple" that I was remembering.
Dan
7. Re: getOpenFileName
- Posted by WJ1N Feb 09, 2011
- 1814 views
filename = getOpenFileNameEx( Window1, -- parent window "e:\\euphoria\\stocks\\*.dat", -- no default name { "Text Files", "*.TXT", -- text files "Data Files","*.DAT", "All Files", "*.*" }, -- everything else { {ofnFilterIndex,2} } )
try this
This worked for me unless i misunderstand what you want.
Johnny
8. Re: getOpenFileName
- Posted by dcole Feb 11, 2011
- 1654 views
filename = getOpenFileNameEx( Window1, -- parent window "e:\\euphoria\\stocks\\*.dat", -- no default name { "Text Files", "*.TXT", -- text files "Data Files","*.DAT", "All Files", "*.*" }, -- everything else { {ofnFilterIndex,2} } )
try this
This worked for me unless i misunderstand what you want.
Johnny
Yes that's what I want. It does work thank you very much.
Don Cole