Hi All
Any experiment on fifth ( last ) parameter ( <lNoChangeDir> ) of GetFile() ?
I am expecting that if it's default value is .F. and when is .T. user don't have ability for changing
DIR/Folder while selecting file(s).
But whatever this value is, GetFile() always allows changing DIR/Folder to user.
Either my expection is wrong or I am missed another thing(s)
Any opinion ?
( XP-SP2, HMG-2.6.4 )
Regards
--
esgici
Fifth parameter of GetFile()
Moderator: Rathinagiri
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Fifth parameter of GetFile()
Viva INTERNATIONAL HMG
- Rathinagiri
- Posts: 5477
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Fifth parameter of GetFile()
IMHO it is not the option given to the user not to change the directory he selects. But it is the value of the 'current directory' system variable. If you want to change the value of the system variable to that particular directory after the user selects, you use .t. otherwise, if it is only to select the file and the current directory variable should be in tact, you have to use .f.
Please consider this small example.
Please consider this small example.
Code: Select all
# include "minigui.ch"
function main
define window sample at 0,0 width 200 height 200 main
define button get1
row 10
col 10
caption "with .t."
action getfilewithtrue()
end button
define button get2
row 40
col 10
caption "with .f."
action getfilewithfalse()
end button
end window
sample.center
sample.activate
return nil
function getfilewithtrue
g := getfile({ {'All Files','*.*'} } , 'Select a File' , 'c:\' , .f. , .t.)
msginfo(getcurrentfolder())
return nil
function getfilewithfalse
g := getfile({ {'All Files','*.*'} } , 'Select a File' , 'c:\' , .f. , .f.)
msginfo(getcurrentfolder())
return nil
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Fifth parameter of GetFile()
Thanks a lot Rathi
Understood; it'is : <lNoChangeCurrDir>
Thanks again you have interested and solved my problem
Regards
--
esgici
Understood; it'is : <lNoChangeCurrDir>
Thanks again you have interested and solved my problem
Regards
--
esgici
Viva INTERNATIONAL HMG
- Rathinagiri
- Posts: 5477
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Fifth parameter of GetFile()
Yes in deed.
Regards.
Regards.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.