No way to determine default-dir for BrowseBox???

Using (or providing) components based on the "Win32" framework

No way to determine default-dir for BrowseBox???

Postby MBaas on Mon May 17, 2010 5:21 pm

It's hard to believe there should be no way to select a default-dir for the BrowseBox (10.1), but either I've missed it or it really isn't there (or maybe it's not as obvious as I expected it to be).
Any ideas anyone? ;)
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: No way to determine default-dir for BrowseBox???

Postby hotair on Tue May 18, 2010 3:19 am

StartIn perhaps?
hotair
 
Posts: 5
Joined: Fri Nov 27, 2009 3:21 am

Re: No way to determine default-dir for BrowseBox???

Postby MBaas on Tue May 18, 2010 4:53 am

No, StartIn selects the root of the browseable tree, so using that, I would limit the user to the default-selection...
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: No way to determine default-dir for BrowseBox???

Postby Vince|Dyalog on Tue May 18, 2010 10:35 am

Hi Michael,

I've moved your topic into the Windows: GUI... forum as I felt this place was more appropriate.

I'm afraid that, as HotAir mentioned, Startin is the only property the BrowseBox has which you can set and which are related to directories. As you have seen, it sets which directory to start in, and sets which directory to be the root of the treeview.

You may need to find another control via COM or .Net, or create your own GUI.

Regards,

Vince
Vince|Dyalog
 
Posts: 348
Joined: Wed Oct 01, 2008 9:39 am

Re: No way to determine default-dir for BrowseBox???

Postby MBaas on Tue May 18, 2010 10:56 am

Thanks Vince - maybe that "little" option could be considered for V13... ;)

Or maybe there is a WM_something to set that?
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: No way to determine default-dir for BrowseBox???

Postby Vince|Dyalog on Wed May 19, 2010 9:21 am

Hi Michael,

Therein lies the problem. To implement the BrowseBox, we use the Win32 ShBrowseForFolder which takes a BROWSEINFO structure. We use the Startin property to set pidlRoot in the BROWSEINFO structure.

There is not any way to have the root node be one folder, while setting another folder to be the default selection.
Vince|Dyalog
 
Posts: 348
Joined: Wed Oct 01, 2008 9:39 am

Re: No way to determine default-dir for BrowseBox???

Postby MBaas on Wed May 19, 2010 9:37 am

Hi Vince,

are you sure? It seems there is a way to do this - at least according to this post...

Thanks

Michael
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: No way to determine default-dir for BrowseBox???

Postby Vince|Dyalog on Thu May 20, 2010 9:59 am

Hi Michael,

Ah, sorry, I missed looking at the BrowseCallbackProc documentation.

Thanks for that link, I've tried it out and it works.

I've logged this as RFE 006051.

Regards,

Vince
Vince|Dyalog
 
Posts: 348
Joined: Wed Oct 01, 2008 9:39 am

Re: No way to determine default-dir for BrowseBox???

Postby MBaas on Thu May 20, 2010 11:08 am

Thanks, that's good news.
I just hope to see that implemented before Version 36 ;)

Thanks

Michael
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany


Return to Windows: GUI, COM/OLE/ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest