Invoke custom action on WIX when changing value in Combox

Stuck with combo box and user action in WIX installer.

I have a drop down box containing several values. I want to show some text on the screen (unique for each item in the drop-down list) when the user selects a value from this drop-down list.

In .Net, we can do this easily because we have different predefined events. But on WIX, I do not see such an event.

Has anyone encountered the same problem? Or you can direct me on how I can do this.

+5
source share
2 answers

Windows ( ) . - , combobox (dropdown) . , , , ...

EmbeddedUI ( WiX MSI), ...

UPDATE: , .

<UI>
  ...
  <ComboBox Property="WIX_VERSIONS">
    <ListItem Value="Windows Installer XML 3.0" />
    <ListItem Value="Windows Installer XML 3.5" />
    <ListItem Value="Windows Installer XML 3.6" />
  </ComboBox>
  ...
  <Dialog Id="MyCustomDlg">
    ...
      <Control Id="ComboBoxMain" Type="ComboBox" X="10" Y="60" Width="300" Height="17" Property="WIX_VERSIONS" />
      <Control Id="ButtonMain" Type="PushButton" X="320" Y="60" Width="40" Height="17" Text="Show">
        <Publish Property="COMBOVALUEFORMATTED" Value="You've chosen the [WIX_VERSIONS] version of the toolset" />
      </Control>
      <Control Id="LabelMain" Type="Text" X="10" Y="80" Width="360" Height="17" Property="COMBOVALUEFORMATTED" Text="[COMBOVALUEFORMATTED]" />
    ...
  </Dialog>
</UI>

PushButton , DoAction, . .

+8

WiX . .

DoAction , Combobox - VIRTUALWEBSITEOLD

ComboBox, :

    <Control Id="WebSite" Type="ComboBox" Width="180" Height="18" X="120" Y="48" ComboList="no" Property="VIRTUALWEBSITE">
       <Publish Event="DoAction" Value="LansaInitVirtualFolders"><![CDATA[VIRTUALWEBSITE <> VIRTUALWEBSITEOLD]]></Publish>
    </Control>

, DoAction (, ), Combobox OLD.

  Tstring wszWebsite = ReadProperty( _T( "VIRTUALWEBSITE") );
  Tstring wszWebsiteOld = ReadProperty( _T ( "VIRTUALWEBSITEOLD" ) );

  // If unchanged ignore request
  if ( wszWebsite == wszWebsiteOld ) return true ;

 [Do Some stuff]

  // Set the saved state of the combobox so we don't get called again until it changes
  if ( nResult == ERROR_SUCCESS || nResult == ERROR_NO_MORE_ITEMS)
  {
     WriteProperty( _T("VIRTUALWEBSITEOLD" ), wszWebsite.c_str () );
  }

(: Twin Dialog, , , . , Next Back DOES , Twin Dialog )

0

All Articles