1. Pau Haro
  2. PowerBuilder
  3. Wednesday, 22 July 2020 08:14 AM UTC

Hello,

Im trying to get an image for my aplication using the GetFileOpenName function. It's working I can choose the image that I want, but I want to block user to change the directory, the network button and the test file creation.

 

This is the code that I use to open the wizard:

GetFileOpenName(f_traduir("M","Seleccioni imatge"), ls_path, ls_name, "", ls_types, ls_default_path, 2624)

 

Im using the flag -> 2624

2^6 = 64 -> No move from actual folder
2^9 = 512 -> No show network button
2^11 = 2048 -> No create file

 

It hides the network button and don't let me create file, but I can change the folder. What I should do to block the directory change?

Accepted Answer
René Ullrich Accepted Answer Pending Moderation
  1. Wednesday, 22 July 2020 09:58 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Pau,

documentation for flag OFN_NOCHANGEDIR is: "Restore the current directory to its original value if the user changed the directory while searching for files. ..."

So for my understanding it does not prevent the user from changing the directory in the dialog.

I don't know a way how to do what you want with GetFileOpenName. You could check the returned file for correct directory. Or you implement your own selection dialog.

HTH,

René

Comment
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.