Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 518942

Summary: [Win32] Directory Dialog doesn't scroll to the filter path set.
Product: [Eclipse Project] Platform Reporter: Sandeep T D S <sandeep.tds>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: lshanmug, niraj.modi, sandeep.tds
Version: 4.5Keywords: triaged
Target Milestone: 4.8   
Hardware: PC   
OS: Windows All   
Whiteboard:
Attachments:
Description Flags
Screenshot none

Description Sandeep T D S CLA 2017-06-29 07:00:48 EDT
My Directory Dialog code: 

		Display.getDefault().syncExec(() -> {
			Shell shell = new Shell(Display.getDefault(), SWT.NO_TRIM | SWT.PRIMARY_MODAL);
			shell.setSize(0, 0);
			shell.open();

			DirectoryDialog directoryDialog = new DirectoryDialog(shell, SWT.SHEET);
			directoryDialog.setFilterPath(myPath);
			directoryDialog.setMessage("My Message");
			directoryDialog.setText("My Title"));
			shell.forceActive();
			shell.setActive();
			shell.setImage(Icons.IMAGE_APP_LOGO);

			if (SysInfo.isWin()) {
				shell.setMinimized(true);
				shell.setMinimized(false);
			}
			favoriteParentFolder = directoryDialog.open();
			shell.dispose();
		});


My Issue is: 

Lets myPath = "C:\\Username\\Desktop\\Z Folder"

I have "A Folder", "B Folder", ... inside Desktop. 

The Directory Dialog View, doesn't show Z Folder as my selection. I am required to scroll down to see.
Comment 1 Sandeep T D S CLA 2017-06-29 07:01:26 EDT
Created attachment 269121 [details]
Screenshot
Comment 2 Niraj Modi CLA 2017-06-30 04:27:55 EDT
Issue also reproducible on Win7.

Seem like a known issue with Windows native 'SHBrowseForFolder' layer:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/a22b664e-cb30-44f4-bf77-b7a385de49f3/shbrowseforfolder-bug-in-windows-7?forum=vcgeneral

There is a possible workaround discussed in the above article.
Comment 3 Lakshmi P Shanmugam CLA 2018-02-06 01:32:40 EST
Is this a problem with the new Directory Dialog?
Comment 4 Niraj Modi CLA 2018-05-17 10:23:01 EDT
(In reply to Lakshmi Shanmugam from comment #3)
> Is this a problem with the new Directory Dialog?

Attached Screen shot is of old directory dialog.
With snippet is comment 0, I don't see the problem with new Directory Dialog(support added via bug 443250)

*** This bug has been marked as a duplicate of bug 443250 ***