Browse for folder
Browse for folder
Is it possible to have a 'Browse for Folder' button at the end of a text box?
I want to get several paths from the user and don't want to put them one per form with drive and directory list boxes.
I want to get several paths from the user and don't want to put them one per form with drive and directory list boxes.
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Yes of course. Look at some themes to see how it works or just follow the instructions in the help file.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
I can see the 'Select Target Folder' and have found the example in a theme. I think the action I am looking for it 'Select Custom Folder' but I don't see how I can receive the value selected back into the text box.
When I select the text box control, in the Receives Information list box, there is no Custom Folder and when I select the browse button, the Writes Values to Variable option is disabled.
I have searched the help but have not found any description of the 'Select Custom Folder' action.
Thanks for your help.
When I select the text box control, in the Receives Information list box, there is no Custom Folder and when I select the browse button, the Writes Values to Variable option is disabled.
I have searched the help but have not found any description of the 'Select Custom Folder' action.
Thanks for your help.
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
I apologize for the lack of documentation on this issue.
So, step by step:
1. Drag-drop a button and an edit field to the form.
2. Set the name of the button to MYFOLDER.
3. Double-click the button, choose the Select Custom Folder action.
4. Double-click the edit field, set its Receives Information to [Written Variable Value] and set Writes Values to Variable to MYFOLDER.
5. Last but not least, before calling the dialog from your MSIcode script, make sure you call the Set Variable command to declare/pre-initialize the MYFOLDER variable to whatever value you like.
So, step by step:
1. Drag-drop a button and an edit field to the form.
2. Set the name of the button to MYFOLDER.
3. Double-click the button, choose the Select Custom Folder action.
4. Double-click the edit field, set its Receives Information to [Written Variable Value] and set Writes Values to Variable to MYFOLDER.
5. Last but not least, before calling the dialog from your MSIcode script, make sure you call the Set Variable command to declare/pre-initialize the MYFOLDER variable to whatever value you like.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
>pre-initialize the MYFOLDER variable to whatever value you like.
in previous version value passed via this variable was used to initialize selections on DirectoryListBox, DriveComboBox and FileListBox.
Now this value is ignored, when selection done in dialog is passed back properly.
Attached is the welcome dialog where I've done test on default and empty IA project. The test code is:
label: Welcome Dialog
Set Variable SCRIPT to d:\\IA_Bugs
MessageBox: SCRIPT, $SCRIPT$
Display Dialog: welcome, wait for dialog to return (modal)
MessageBox: SCRIPT, $SCRIPT$
File Attached:
welcome.dfm
in previous version value passed via this variable was used to initialize selections on DirectoryListBox, DriveComboBox and FileListBox.
Now this value is ignored, when selection done in dialog is passed back properly.
Attached is the welcome dialog where I've done test on default and empty IA project. The test code is:
label: Welcome Dialog
Set Variable SCRIPT to d:\\IA_Bugs
MessageBox: SCRIPT, $SCRIPT$
Display Dialog: welcome, wait for dialog to return (modal)
MessageBox: SCRIPT, $SCRIPT$
File Attached:
welcome.dfm
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
DirectoryListBox still works - it shows the assigned folder, as do the newer Explorer style controls such as ShellTree and ShellCombo.
But make sure the control's Receives Information property is set to [Written Variable Value] and that the variable value makes sense for the target control - in your case, that is to say it contains a folder path.
But make sure the control's Receives Information property is set to [Written Variable Value] and that the variable value makes sense for the target control - in your case, that is to say it contains a folder path.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
> DirectoryListBox, DriveComboBox and FileListBox
none of them reflect assigned value.
> make sure the control's Receives Information property is set to [Written Variable Value]
I'm absolutely sure. See attached dlg.
And it is on default, IA created project. No other code changed exept the lines listed
none of them reflect assigned value.
> make sure the control's Receives Information property is set to [Written Variable Value]
I'm absolutely sure. See attached dlg.
And it is on default, IA created project. No other code changed exept the lines listed
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Test each control stand alone to ensure no interactions between controls are complicating things first.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
I've put controls on separate dialogs and displayed them one by one.
Results are really strange.
DriveComboBox shows always system drive (C:) but returns selection properly.
DirectoryListBox interprets path properly with one exeption - when root folder is passed then first subfolder is selected (but root returned). It returns selection properly.
FileListBox interprets drive properly but displays content of root folder, then returns selection properly.
When variable is set to empty string, then FileListBox makes 'Access violation'...
I've WinXP Prof ENG with all current updates (exept NET 3.5).
Old installer (generated using IA7) works fine, when rebuilded under IA8 behaves as described.
Results are really strange.
DriveComboBox shows always system drive (C:) but returns selection properly.
DirectoryListBox interprets path properly with one exeption - when root folder is passed then first subfolder is selected (but root returned). It returns selection properly.
FileListBox interprets drive properly but displays content of root folder, then returns selection properly.
When variable is set to empty string, then FileListBox makes 'Access violation'...
I've WinXP Prof ENG with all current updates (exept NET 3.5).
Old installer (generated using IA7) works fine, when rebuilded under IA8 behaves as described.
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
I'm unable to reproduce the AV with the variable set to an empty string.
I also think you're confused about folder selection. The selected folder has an open folder icon. In your case that's the root folder.
Also, any reason you're using these antiquated controls instead of their more modern counterparts?
I also think you're confused about folder selection. The selected folder has an open folder icon. In your case that's the root folder.
Also, any reason you're using these antiquated controls instead of their more modern counterparts?
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
The problems with the old controls have been reproduced and are being fixed, with the exceptions as noted above which are your misunderstandings.
Bot sets of controls will continue to be permanently supported, but since your v7 setup also had the new set of controls, I was just wondering why you chose the old fashioned ones?
Bot sets of controls will continue to be permanently supported, but since your v7 setup also had the new set of controls, I was just wondering why you chose the old fashioned ones?
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Sorry, not supported. However, note that we'll also fix the old controls so people can use them to their heart's content - to that end I repeat that we were unable to reproduce the crash...
At any rate, glad to hear that the new controls are a better substitute for your situation.
At any rate, glad to hear that the new controls are a better substitute for your situation.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 37 guests