Dynamically binding properties to UI dialog

2 Messages Forum Options Options
Embed this topic
Permalink
Bardo
Dynamically binding properties to UI dialog
Reply Threaded MoreMore options
Print post
Permalink
Hi,

 

I have a dialog that has some textboxes that set the values of some global
properties.  I ideally want the dialog to be re-usable so I can call it more
than once from the same installation, but have it be bound to a different
set of properties the second time I call it.

Specifically, it has database details such as database name, server name,
instance etc that are set by the user's input.  I am wanting the user to be
able to select which databases to install (they will be different features
in the menu).

When they select more than 1 database, I would like the user to be able to
customise the database name, server etc FOR EACH DATABASE that they chose to
install.  I would like to just re-use the same dialog definition but somehow
have it update the database settings for its specific feature.

 

Is this possible or is it possible to code/configure something that would
behave in a similar manner?

 

Thanks!

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@...
https://lists.sourceforge.net/lists/listinfo/wix-users
Richard-45
Re: Dynamically binding properties to UI dialog
Reply Threaded MoreMore options
Print post
Permalink

In article <BLU105-DAV260F0BCAEEE1C0FE0DC0CB5350@...> <000301c92aff$307179e0$91546da0$@com>,
    "Nic Barden" <bardo33@...>  writes:

> I have a dialog that has some textboxes that set the values of some global
> properties.  I ideally want the dialog to be re-usable so I can call it more
> than once from the same installation, but have it be bound to a different
> set of properties the second time I call it.

The way you do this is to associate indirect properties with the UI
controls.  When you use indirect properties, the property associated
with the control doesn't contain the value it contains the name of the
property that will hold the value.  So when I have a text box
associated with the FOO property and I enter "bar" as the text, the
property FOO contains the value "bar".  When I have a text box
associated with the indirect property FOO, and FOO contains the value
"STUFF" and I enter "bar" as the text, the property STUFF contains the
value "bar".  So FOO contains the name of the property that will
receive the value entered from the UI.

In this way you can re-use a dialog several times, as long as you
change the contents of the indirect properties each time you reuse the
dialog the data will go to different places even though you have a
single dialog.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
      <http://www.xmission.com/~legalize/book/download/index.html>

        Legalize Adulthood! <http://blogs.xmission.com/legalize/>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@...
https://lists.sourceforge.net/lists/listinfo/wix-users