DrDan
14th May 2007 15:38 UTC
How to set the size of the "Browse for folder" dialog?
I am having some trouble with the DirRequest field on a custom page in that, the "Browse for folder" dialogue box that appears varies wildly in size on our testers computers.
Is there a way to set the size, and how do you do it?
Thanks in advance.
Afrow UK
14th May 2007 17:38 UTC
That's a common Window's dialog and has a fixed size. The size will vary depending on the system font or resolution (doh!)
Stu
DrDan
15th May 2007 09:06 UTC
Are you sure it's fixed size?
I can re-size and re-position my "Browse for Folder" dialogue box and its size is somehow remembered each time I run the installer. The position is always relative to the installer Window, which in some cases can result in part of the dialogue box being outside of the screen area.
Is this a registry setting somewhere, or something?
DrDan
18th May 2007 14:26 UTC
No answer?
I'm guessing no one has an answer on this one...
Afrow UK
18th May 2007 17:41 UTC
Good point. You can resize it! No idea where the size is saved though and I could not find anything on Google.
Stu
DrO
18th May 2007 17:59 UTC
it's done a global and then per-app instance from what i remember. you can cause a resize if you use the callback mechanism on that api but that'd require the IO plugin to altered to have that ability (i can't remember what else is required for it since it's been an age since i messed around with those parts of the OS - really needs a read of the api specs and for someone to go from there)
-daz
Afrow UK
18th May 2007 19:24 UTC
I changed the size of my browse dialog in an NSIS test installer and then in Thunderbird it was the same size (long after closing the installer).
Stu
DrO
20th May 2007 15:25 UTC
i think there were OS inconsistancies with that sizing. has been so long since i had to mess around with that stuff i can't remember for certain so i could be entirely wrong, heh. either way, it's a hack to get the thing sized to something different and shouldn't be done
-daz
onad
21st May 2007 12:35 UTC
From top of my head there was somewhere a plugin where one browsed for destination directory INSIDE the installer window.
The other way is to get the x,y,w,h of the NSIS main window (Modern interface) via windows messages on .oninit store the vaues, then after the browse dialog just opened find the dialog handle then send a message to the dialog and resize to the coordinates of the installer main window.
If the above does not make sense to you just ignore, because the solution you want will take a LOT of effort if you have never done anything like this before.