BUG + FEATURE REQUEST: FolderBrowserDialog = broke and useless

G

Guest

Hi,

The following code shows the FolderBrowserDialog = broken.

FolderBrowserDialog folderDialog = new FolderBrowserDialog();
folderDialog.ShowNewFolderButton = false;
folderDialog.ShowDialog();

Setting ShowNewFolderButton to false does bugger all. If I set this to
false it is STILL shown. Genius.

There is also NO WAY to set the root directory to MY OWN path. It MUST be
a SpecialFolder , can we have this so we can set it to any path of our own
choosing?

Thanks
 
C

Cor

Hi,

I do not see the problem, there is a bug in this control concerning path
names longer than 128 characters, but this I did test and works like I would
expect.

FolderBrowserDialog folderDialog = new FolderBrowserDialog();
folderDialog.SelectedPath =
Environment.GetFolderPath(Environment.SpecialFolder.Personal);
folderDialog.ShowNewFolderButton = false;
folderDialog.ShowDialog();

I pasted that personal folder also in it.

I hope this helps?

Cor
 
M

Morten Wennevik

Considering that I could set both my own path and have the "make new
folder" button go away, I'd say you are wrong.
 
G

Guest

Considering I just did that and it fails.

What version are u using because I am on 2003 upgraded from 2002 and its NOT
working.

Just because it works for you doesnt mean it isnt buggy on other setups.

You assume the world orbits around you.

That code I pasted FAILS on mine.

Considering that I could set both my own path and have the "make new
folder" button go away, I'd say you are wrong.
 
G

Guest

I DONT want to use the SPECIAL BLOODY FOLDER hence the feature request. I
cannot put in MY OWN path.

And I have the show new folder set to FALSE as you can see and its SHOWN on
the dialog. So its a version bug that you dont have but I do.
 
G

Guest

Let me clarify the Special Folder request

I want to set the .RootFolder to MY OWN root. Not a predefined SPECIAL
FOLDER.

And I cannot get that NewFolder button to go away with either TRUE OR FALSE,
so its a bug in my version and not yours. Geddit.
 
M

Morten Wennevik

Well, it works when compiling with the csc.exe coming with Framework 1.1
About the setting your own definition of root, are you trying to prevent
users from accessing parent folders or just setting a startup folder which
works with
SelectedPath = "C:\\Windows\\System32";
 
J

James Westgate \(Crainiate\)

I would say dont bother asking for help on this newsgroup again
 
G

Guest

That doesnt restrict the parent accessing.




Well, it works when compiling with the csc.exe coming with Framework 1.1
About the setting your own definition of root, are you trying to prevent
users from accessing parent folders or just setting a startup folder which
works with
SelectedPath = "C:\\Windows\\System32";
 
G

Guest

Welcome to the internet tard, youre new around here arnt u. Let me show you
around.

You dont own shit on here so bugger aff.
 
H

Herfried K. Wagner [MVP]

* said:
The following code shows the FolderBrowserDialog = broken.

FolderBrowserDialog folderDialog = new FolderBrowserDialog();
folderDialog.ShowNewFolderButton = false;
folderDialog.ShowDialog();

Setting ShowNewFolderButton to false does bugger all. If I set this to
false it is STILL shown. Genius.

This is a bug in Windows 2000, it doesn't occur in Windows XP.
 
H

Herfried K. Wagner [MVP]

* "Cor said:
I do not see the problem, there is a bug in this control concerning path
names longer than 128 characters, but this I did test and works like I would
expect.

A really /bad/ bug.
FolderBrowserDialog folderDialog = new FolderBrowserDialog();
folderDialog.SelectedPath =
Environment.GetFolderPath(Environment.SpecialFolder.Personal);
folderDialog.ShowNewFolderButton = false;
folderDialog.ShowDialog();

This won't set the root folder...

;-)
 
H

Herfried K. Wagner [MVP]

* said:
_MAX_PATH is not 128 as far as I remember :D

That's a very ugly limitation caused by a buggy implementation. I
recommend not to use this class...
 
G

Guest

Have we a better class without having to DIY?

Must have been a student that coded this, never let students on LIVE code:D
 
G

Guest

FolderBrowserDialog is a .NET class and suppported, as far as I am concerned
its BROKE on this configuration.

This is a supported configuration and as such I expect a fix. I dont care if
its using some other component.

Sighs, more cleaning up theyre krap.
 
H

Herfried K. Wagner [MVP]

* Elder Hyde said:
FolderBrowserDialog folderDialog = new FolderBrowserDialog();
folderDialog.ShowNewFolderButton = false;
folderDialog.RootFolder = Environment.SpecialFolder.Cookies;
folderDialog.ShowDialog();

Console.WriteLine(folderDialog.ShowNewFolderButton);
Console.ReadLine();

And "false" is printed to the console, but the "New Folder" button is
still shown. Seems you got it right, it's a bug.

Which Windows version do you use?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top