Wix Edit Control white on white with no border

时间:2018-02-01 18:07:52

标签: wix windows-installer

<UI>
    <Dialog Id="GetUserSecretDlg" Width="370" Height="270" Title="Vendor Customer Secret">
        <Control Id="Install" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Default="yes" Text="Install" Hidden="yes">
            <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1</Publish>
            <Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
            <Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
            <Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
            <Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
            <Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
            <Condition Action="disable"><![CDATA[LicenseAccepted <> "1"]]></Condition>
            <Condition Action="enable">LicenseAccepted = "1"</Condition>
            <Condition Action="show">ALLUSERS</Condition>
        </Control>

        <Control Id="UserSecret" Type="Edit" X="188" Y="202" Width="124" Height="18" Indirect="no" Property="CUSTOMERSECRET" />

        <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeDlgBitmap)" />
        <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
            <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
        </Control>
        <Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
        <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
        <Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="Customer Secret" />
    </Dialog>
</UI>

The Edit control is invisible - white on white with no border. I tried Sunken. I tried HasBorder. (HasBorder is not a valid property). This is basically a copy of the WelcomeDlg.wxs from the Wix source that was lightly modified.

1 个答案:

答案 0 :(得分:0)

这是一个堆叠问题。位图控件的大小与对话框几乎相同。也许Wix人只是马虎。因此,修复方法是将Bitmap方式移动到源文件的顶部,以便源文件中的控件进一步堆叠在其上。

我将Bitmap移动到Dialog元素的顶部。如果位图的大小合适 - 我责怪你Wix的源文件......那么这就没有必要了。

<Fragment>
  <Property Id="CUSTOMERSECRET" Value="C:\Heska XML" Secure="yes"/>

    <UI>
        <Dialog Id="GetUserSecretDlg" Width="370" Height="270" Title="Vendor Customer Secret">
            <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeDlgBitmap)" />
            <Control Id="Install" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Default="yes" Text="Install" Hidden="yes">
                <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1</Publish>
                <Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
                <Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
                <Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
                <Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
                <Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
                <Condition Action="disable"><![CDATA[LicenseAccepted <> "1"]]></Condition>
                <Condition Action="enable">LicenseAccepted = "1"</Condition>
                <Condition Action="show">ALLUSERS</Condition>
            </Control>

            <Control Id="UserSecret" Type="Edit" X="188" Y="202" Width="124" Height="18" Indirect="no" Property="CUSTOMERSECRET" />
                ...