cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
klosezhang
Level 3

How to create more than one File Browse Dialog within the same dialog panel

Hi all,

I had a read for creating File Browse Dialog according to http://helpnet.installshield.com/installshield16helplib/FileOpenDialog-HowTo.htm
which is great.

However, my problem is I need to create more than one file browse dialog within the same panel. And when I implement the solution as mentioned in the above link, it always set the selected file path into the first editable text field, even I have multiple "browse“ buttons appended after other text fields. And I cannot find the solution to specify the target text field from "FileBrowse.dll"

Please advise.

Thank you.
Labels (1)
0 Kudos
(9) Replies
hidenori
Level 17

You can accomplish your requirement by using a different property for each text field control. For example, associate IS_BROWSE_FILEBROWSED1 with the first text field, and IS_BROWSE_FILEBROWSED2 with the second one. Also, you need to change the behavior of the browse buttons to set the new properties from the value of the IS_BROWSE_FILEBROWSED property after FileBrowse dialog is finished.

To do so, add a new event with the following settings to the first browse button :

Event: [IS_BROWSE_FILEBROWSED]
Argument: [IS_BROWSE_FILEBROWSED1]
Condition: 1

To the second browse button, add a new event with the following settings :

Event: [IS_BROWSE_FILEBROWSED]
Argument: [IS_BROWSE_FILEBROWSED2]
Condition: 1

Note that the new events needs to be called after the event that launches the FileBrowse dialog.

Hope that helps.
0 Kudos
klosezhang
Level 3

Thank you very much for the reply! However, the solution requires creating a new event which receives argument to specify the text field name. I am not able to find where I can create event in InstallShield Spring 2012.

Thank you very much.
Regards,


hidenori wrote:
You can accomplish your requirement by using a different property for each text field control. For example, acoociate IS_BROWSE_FILEBROWSED1 with the first text field, and IS_BROWSE_FILEBROWSED2 with the second one. Also, you need to change the behavior of the browse buttons to set the new properties from the value of the IS_BROWSE_FILEBROWSED property after FileBrowse dialog is finished.

To do so, add a new event with the following settings to the first browse button :

Event: [IS_BROWSE_FILEBROWSED]
Argument: [IS_BROWSE_FILEBROWSED1]
Condition: 1

To the second browse button, add a new event with the following settings :

Event: [IS_BROWSE_FILEBROWSED]
Argument: [IS_BROWSE_FILEBROWSED2]
Condition: 1

Note that the new events needs to be called after the event that launches the FileBrowse dialog.

Hope that helps.
0 Kudos
hidenori
Level 17

Please check out the "To add the Open dialog functionality to an end-user dialog:" section of the Launch a File Open Dialog help topic. The step 2. illustrates how to add a new event to your browse buttons.
0 Kudos
klosezhang
Level 3

Thank you hidenori

Yes I saw that part, however, it requires to choose the event as "DoAction", with Argument "FileBrowser" which points to "\redist\language independent\i386\FileBrowse.dll"

While your solution is
Event: [IS_BROWSE_FILEBROWSED]
Argument: [IS_BROWSE_FILEBROWSED1]
Condition: 1

I don't know how to create event "[IS_BROWSE_FILEBROWSED]" as it is not listed in the event select drop down list, and I doubt if it will work if I just enter "[IS_BROWSE_FILEBROWSED]" into Event dropdown list as it is yet not defined.

Thanks.
Regards

hidenori wrote:
Please check out the "To add the Open dialog functionality to an end-user dialog:" section of the Launch a File Open Dialog help topic. The step 2. illustrates how to add a new event to your browse buttons.
0 Kudos
hidenori
Level 17

You can simply type "[IS_BROWSE_FILEBROWSED]" into the Event setting. The syntax for the SetProperty event is different than for other ControlEvents. See the SetProperty ControlEvent help topic for more information.
0 Kudos
klosezhang
Level 3

Hi I have tried with type in with you suggested, along with argument and condition, but it does not work. The button doesn't response when pressed.

The I tried with inserting "DoAction" with argument "FileBrowse" before event "[IS_BROWSE_FILEBROWSED]", the file browser then launches, but still only set to the first editable text field, instead of what I have specified (Argument: [IS_BROWSE_FILEBROWSED1]) in event "[IS_BROWSE_FILEBROWSED]"





hidenori wrote:
You can simply type "[IS_BROWSE_FILEBROWSED]" into the Event setting. The syntax for the SetProperty event is different than for other ControlEvents. See the SetProperty ControlEvent help topic for more information.
0 Kudos
hidenori
Level 17

Since you want to set IS_BROWSE_FILEBROWSED1 and IS_BROWSE_FILEBROWSED2 to the value of IS_BROWSE_FILEBROWSED, the Event and Argument settings may need to be switched as follows. Can you try?

Event: [IS_BROWSE_FILEBROWSED1]
Argument: [IS_BROWSE_FILEBROWSED]
Condition: 1

Event: [IS_BROWSE_FILEBROWSED2]
Argument: [IS_BROWSE_FILEBROWSED]
Condition: 1
0 Kudos
klosezhang
Level 3

Thank you Hidenori,

I did try with that. And the behavior I observed is:
When the 1st browse button is pressed (And the file is then selected), the 1st edit field (IS_BROWSE_FILEBROWSED1) is set.
Then 2nd browse button is pressed, the 1st and the 2nd edit field (IS_BROWSE_FILEBROWSED2) are both set.

Then I go back to press the 1st browse button, the 1st edit field is set, the 2nd edit field remains the same (Unchanged).

Thanks.


hidenori wrote:
Since you want to set IS_BROWSE_FILEBROWSED1 and IS_BROWSE_FILEBROWSED2 to the value of IS_BROWSE_FILEBROWSED, the Event and Argument settings may need to be switched as follows. Can you try?

Event: [IS_BROWSE_FILEBROWSED1]
Argument: [IS_BROWSE_FILEBROWSED]
Condition: 1

Event: [IS_BROWSE_FILEBROWSED2]
Argument: [IS_BROWSE_FILEBROWSED]
Condition: 1
0 Kudos
Seuliommvf
Level 2

What a bug I found the solution alone. InstallShield is not cheap at all and is a giant bug I get an internal error just when I choose more than one language and you know why? Just because I dont suply the product version.

???? GTA 

0 Kudos