Wix自定义ui,编辑控件中的默认文本未显示

时间:2017-04-28 09:59:55

标签: wix windows-installer wix3

我为WIX开发了一个自定义对话框。我需要为编辑控件设置默认值,到目前为止我得到了这个:

 <UI Id="DlgDbSettingsUi">
      <Dialog Id="DlgDbSettings" Width="370" Height="270">
        <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
        <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.InstallDirDlgBannerBitmap)" />
        <Control Type="Text" Id="lblHeader" Width="333" Height="17" X="8" Y="56">
          <Text>Por favor, especifique los siguientes datos requeridos para la configuración de.</Text>
        </Control>
        <Control Type="Text" Id="lblIp" Width="78" Height="17" X="11" Y="82">
          <Text>IP de base de datos:</Text>
        </Control>
        <Control Type="Edit" Id="txtIp" Width="190" Height="15" X="98" Y="82" Property="DATABASE_IP" />
        <Control Type="Text" Id="lblPort" Width="50" Height="17" X="11" Y="101">
          <Text>Puerto:</Text>
        </Control>
        <Control Type="Edit" Id="txtPort" Width="190" Height="15" X="98" Y="101" Property="DATABASE_PORT">
          <Text>1521</Text>
        </Control>
        <Control Type="Text" Id="lblInstancia" Width="50" Height="17" X="11" Y="120">
          <Text>Instancia:</Text>
        </Control>
        <Control Type="Edit" Id="txtInstancia" Width="190" Height="15" X="98" Y="120" Property="DATABASE_INSTANCE">
          <Text>DEFAULT_INSTANCE</Text>
        </Control>
        <Control Id="Next" Type="PushButton" ElevationShield="no" X="240" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUIOK)"/>
        <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)"/>
        <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
      </Dialog>
    </UI>

但是,当我运行安装时,我的自定义视图显示空的编辑控件。是否在Control编辑标签内嵌入Text标签的方式?我做错了吗?

enter image description here

1 个答案:

答案 0 :(得分:2)

在与每个编辑控件绑定的属性中设置默认值。