I've tried to search for this, but I always get hundreds of unrelated results.
My installer (using X16) has a dialog with a path for the target directory and a button to browse. Browsing and selecting a folder updates the text box. (normal stuff)
I want to add a second text box and a second browse button to select another path. I've got the text box added and the new button will browse - but I don't see a way to make the result of the second browse button update the second text box.
How is that done?
How to update a text box from a browse button in the dialog editor
Re: How to update a text box from a browse button in the dialog editor
This topic applies to InstallAware Multi Platform as well.
That's a great question.
I've attached a sample InstallAware Multi Platform dialog (and its rules file) that I built for you.
So let's say you have two edit boxes, Edit1 and Edit2, and two buttons, Button1 and Button2 - as in my attached sample.
Pull up the Define Interactive Characteristics dialog from the View | Object Behavior menu.
From the Control drop-down, select each button and set its Performs Action field to Select Custom Folder.
Then, from the same drop-down menu, select each edit box, set its Receives Information field to [Written Variable Value], and in its Writes Values to Variable field, type in the name of the button to associate with the edit box (ex: type BUTTON1 for Edit1, etc.)
In your script, define the BUTTON1 variable using the Set Variable command (assigning it to its default value) before showing your dialog; and just dereference that variable normally typing $BUTTON1$ in any command you need it.
You can use this same trick to capture any custom data inside edit boxes, BTW - you don't have to assign buttons to edit boxes; they can still be associated with variables and update them normally, any time.
The buttons here are just helping to automatically bring up a Browse for Folder dialog when they are clicked, you could achieve the same effect manually using scripting (via the Browse for Folder command) and the Return from Dialog button action under Object Behavior - just as an example.
The Game Porting Toolkit Installer sample included with InstallAware Multi Platform (and also available at https://github.com/installaware/AGPT) showcases how to handle dialog events like this - hope that helps!
That's a great question.
I've attached a sample InstallAware Multi Platform dialog (and its rules file) that I built for you.
So let's say you have two edit boxes, Edit1 and Edit2, and two buttons, Button1 and Button2 - as in my attached sample.
Pull up the Define Interactive Characteristics dialog from the View | Object Behavior menu.
From the Control drop-down, select each button and set its Performs Action field to Select Custom Folder.
Then, from the same drop-down menu, select each edit box, set its Receives Information field to [Written Variable Value], and in its Writes Values to Variable field, type in the name of the button to associate with the edit box (ex: type BUTTON1 for Edit1, etc.)
In your script, define the BUTTON1 variable using the Set Variable command (assigning it to its default value) before showing your dialog; and just dereference that variable normally typing $BUTTON1$ in any command you need it.
You can use this same trick to capture any custom data inside edit boxes, BTW - you don't have to assign buttons to edit boxes; they can still be associated with variables and update them normally, any time.
The buttons here are just helping to automatically bring up a Browse for Folder dialog when they are clicked, you could achieve the same effect manually using scripting (via the Browse for Folder command) and the Return from Dialog button action under Object Behavior - just as an example.
The Game Porting Toolkit Installer sample included with InstallAware Multi Platform (and also available at https://github.com/installaware/AGPT) showcases how to handle dialog events like this - hope that helps!
- Attachments
-
- multiples.zip
- (1.39 KiB) Downloaded 75 times
John Gaver
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm
Re: How to update a text box from a browse button in the dialog editor
Thank you so much!
I kept digging around after posting the question and found a similar answer just before seeing your reply (and after scrolling through over a hundred(!) search result hits).
It's here - from 2008:
viewtopic.php?t=4238&highlight=browse+folder
This really should be part of the product documentation.
Thanks again.
I kept digging around after posting the question and found a similar answer just before seeing your reply (and after scrolling through over a hundred(!) search result hits).
It's here - from 2008:
viewtopic.php?t=4238&highlight=browse+folder
This really should be part of the product documentation.
Thanks again.
Who is online
Users browsing this forum: No registered users and 27 guests