2017-07-02 58 views
0

我想给用户一个选择他/她想要连接到数据库的身份验证模式的选择。我提供的两种选择是:Windows身份验证和SQL Server身份验证。Wix安装程序 - 无法在对话框中查看单选按钮

由于某种原因,我无法看到对话框上的单选按钮。

Image showing no radio button

对话框代码如下所示:所述RadionButton的

<Property Id="CHOICE_WIN_SQL" Value="1" Secure="yes"/> 


    <Dialog Id="WinSqlChoiceDlg" Width="370" Height="270" Title="[ProductName] Setup"> 
    <Control Type="Text" Width="275" Height="10" X="25" Y="98" Id="TestRadioButton" Text="Radio button should appear below:" /> 
    <Control Id="AuthenticationType" Property="CHOICE_WIN_SQL" Type="RadioButtonGroup" X="25" Y="98" Width="300" Height="50"> 
     <RadioButtonGroup Property="CHOICE_WIN_SQL"> 
     <RadioButton X="25" Y="110" Value="0" Height="10" Width="275" Text="Windows Authentication"/> 
     <RadioButton X="25" Y="123" Value="1" Height="10" Width="275" Text="Sql Authentication"/> 
     </RadioButtonGroup>   
    </Control>  
    </Dialog> 

回答

0

更改X和Y值以下数字:

单选按钮X = “” Y = “”

RadioButton X =““Y =” “

因此,他们应该是这样的:

<RadioButton X="0" Y="0" Value="0" Height="10" Width="275" Text="Windows Authentication"/> 
<RadioButton X="0" Y="20" Value="1" Height="10" Width="275" Text="Sql Authentication"/> 

现在单选按钮会出现,但‘Windows身份验证’单选按钮将您的标签重叠。所以Ÿ值更改为例如:

<Control Type="Text" Width="275" Height="10" X="25" Y="50" Id="TestRadioButton" 
Text="Radio button should appear below:" /> 

你的最终代码应该是这样的:

<Property Id="CHOICE_WIN_SQL" Value="1" Secure="yes"/> 
<Dialog Id="WinSqlChoiceDlg" Width="370" Height="270" Title="[ProductName] Setup"> 
<Control Type="Text" Width="275" Height="10" X="25" Y="50" Id="TestRadioButton" Text="Radio button should appear below:" /> 
<Control Id="AuthenticationType" Property="CHOICE_WIN_SQL" Type="RadioButtonGroup" X="25" Y="98" Width="300" Height="50"> 
    <RadioButtonGroup Property="CHOICE_WIN_SQL"> 
    <RadioButton X="0" Y="0" Value="0" Height="10" Width="275" Text="Windows Authentication"/> 
    <RadioButton X="0" Y="20" Value="1" Height="10" Width="275" Text="Sql Authentication"/> 
    </RadioButtonGroup>   
</Control>  

这应该做的伎俩。