[BUG] BrowseForFolder not working correctly

rs.BrowseForFolder() works fine on first run. Thereafter, it opens in the background and cannot be brought forward. Since my browser window is always fullscreen for some reason, I can sometimes reach the Select Folder button before it disappears. This seems to only affect scripts running from the editor. Running the script directly seems to work okay. (I think this worked fine until an update that happened today…but I’m not 100% sure about that)

#! python 2
import rhinoscriptsyntax as rs
import Rhino

folder = rs.BrowseForFolder()
Rhino.RhinoApp.WriteLine(folder)

systeminfo.txt (2.4 KB)

@eirannejad @dale

With the last update (yesterday?), this problem changed slightly but still exists. Now, if I call rs.BrowseForFolder(), it will work normally the first time or two, and then the browser goes to the back and you can’t bring it to the front unless (and here’s where it’s different), if you click on the script editor, then you can click on the browser window and bring it to the front. I don’t think this was possible before. (Although, perhaps I’m wrong…maybe I forgot to test clicking on the script editor last time…but I think I did try that)

Now, in between my first post and this post, I have corrected my issue where my folder browser is huge and unsizeable (this was a windows bug and required deleting an entry in the registry and affected Rhino on my PC only by chance). So it could be that this problem would have manifested itself exactly like this last time if my file browser window had been functioning correctly at the time. In other words, if the last update did nothing with regards to this issue, my slightly different experience may be related to me correcting this oversized file browser issue I’ve been having for years. I was able to fix that issue thanks to this discussion (in case it matters somehow)…

https://www.tenforums.com/software-apps/15714-save-dialog-resize-problem.html

Like before, this appears to only be an issue when running from the script editor. Running the script directly seems to work fine. And reloading the python engine appears to solve it in a way, but each time you run the script, you have to reload the python engine to get the browser folder to behave correctly the next time.

If this is just my PC and no one else is experiencing it, no biggie. I’ve got Rhino 6 and 7 where it works fine.

systeminfo.txt (2.4 KB)