【问题标题】:Wix custom ui, default text in edit control not shownWix自定义用户界面,编辑控件中的默认文本未显示
【发布时间】:2017-04-28 09:59:54
【问题描述】:

我为 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 标签是可行的方法吗?我做错了吗?

【问题讨论】:

    标签: wix windows-installer wix3


    【解决方案1】:

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

    【讨论】:

    • 感谢您的宝贵时间。我还尝试使用 与结果一样,编辑框还是空的。
    • DATABASE_IP一个值。
    • 怎么样?你能解释一下你的答案吗?
    • 使用Property 元素。
    • 好的,我明白了,我需要创建一个与分配给编辑的 Property 属性的名称相同的 Property 元素,例如 。谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-20
    • 2011-12-12
    • 2021-03-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多