forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

browse_for_folder1@

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
KennyT



Joined: 02 Aug 2005
Posts: 287

PostPosted: Thu Nov 18, 2021 12:14 pm    Post subject: browse_for_folder1@ Reply with quote

There’s a tiny irritation with the "browse_for_folder1@" routine (and the BROWSEINFO structure link in the help file links to an out of date page: https://msdn.microsoft.com/en-us/library/windows/desktop/bb773205.aspx).

The irritation is that if an initial path is set, it gets selected OK but the window doesn’t auto scroll to bring that path into the initial view.

does anyone know if there is a flag setting that can enable this?

For example: with the starting path set to "D:\data\clients\datafiles", the initial view always seems to start @ desktop with the selected folder way down the tree and thus not visible.

(i note that if i select “make new folder” button, the view 'jumps' perfectly to show the selected folder!)

TIA

K
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2268
Location: Yateley, Hants, UK

PostPosted: Thu Nov 18, 2021 12:50 pm    Post subject: Reply with quote

That must be just one of a set of niggles that mostly we have to live with.

Here's a couple from me:

(1) The link to Browseinfo structure in browse_for_folder@ in FTN95.CHM doesn't work (Internet Explorer - itis?)

(2) Using the standard callback 'FILE_OPENR' has the action button 'Open' while 'FILE_OPENW' gives you 'Save', but the GET_FILTERED_FILE@ route only gives you 'Open' (I think) - but you are directed to the latter if you need to alter the file specification dynamically.

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7142
Location: Salford, UK

PostPosted: Thu Nov 18, 2021 1:47 pm    Post subject: Reply with quote

Thanks for the feedback. I have logged these issues for investigation.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7142
Location: Salford, UK

PostPosted: Sat Nov 20, 2021 2:32 pm    Post subject: Reply with quote

KennyT

Please try the following sample program. Does it do what you want?

Code:
winapp
program main
use clrwin
character path*256
logical folder
integer(7)::hwnd = 0
call set_browse_for_folder_initial@("C:\techsupport")
path = ' '
folder=browse_for_folder1@(hwnd, 'Find Folder', path, z'40')
i = winio@("%40st", path)
end program
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7142
Location: Salford, UK

PostPosted: Sat Nov 20, 2021 2:44 pm    Post subject: Reply with quote

Eddie

1) The link works for me but I have to select "Yes" from the error dialog.

2) The first argument for GET_FILTERED_FILE@ sets the title.

Code:
     WINAPP
     PROGRAM sample
     INTEGER iw
     INTEGER,EXTERNAL::open_func
     iw = winio@('%ca[Sample]&')
     iw = winio@('%mn[&File[&Open,E&xit]]',open_func,'EXIT')
     END
!------------------------------------------------------------
     INTEGER FUNCTION open_func()
     USE mswin
     CHARACTER file*256,path*256,title*20
     INTEGER,PARAMETER::NFILTERS=2
     CHARACTER*20 filtname(NFILTERS),filtspec(NFILTERS)
     title = 'Open Fortran File'
     file  = ' ' !Or the path of a file.
     path  = 'C:\techsupport'
     filtname(1) = 'Fortran files'
     filtspec(1) = '*.f90'
     filtname(2) = 'All files'
     filtspec(2) = '*.*'
     CALL get_filtered_file@(title,file,path,filtname,filtspec,NFILTERS,1)
     IF(len_trim(file) == 0) file = "Open dialog cancelled by user."
     iw = MessageBox(0,file,"Sample",0)
     open_func = 2
     END
Back to top
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 287

PostPosted: Sat Nov 20, 2021 3:52 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:
KennyT

Please try the following sample program. Does it do what you want?

Code:
winapp
program main
use clrwin
character path*256
logical folder
integer(7)::hwnd = 0
call set_browse_for_folder_initial@("C:\techsupport")
path = ' '
folder=browse_for_folder1@(hwnd, 'Find Folder', path, z'40')
i = winio@("%40st", path)
end program


sadly, no. it illustrates the problem i reported in that, if you choose a "deep" path you can't see that folder in the initial view because the window doesn't auto-scroll.

K
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2268
Location: Yateley, Hants, UK

PostPosted: Sat Nov 20, 2021 8:05 pm    Post subject: Reply with quote

Hi Paul,

In respect of (1), I wasn't expecting to have an error dialogue in the first place!

As for (2), it's not the caption, but the text on the action button. Just an observation, not a problem.

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7142
Location: Salford, UK

PostPosted: Sun Nov 21, 2021 9:15 am    Post subject: Reply with quote

Eddie

I appreciate that the error message is unwelcome. It is a Microsoft response that I don't know how to avoid. I guess that it has something to do with the chm compiler.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group