我试图让用户选择他/她想要连接到数据库的身份验证模式。我提供的两个选择是:Windows身份验证和SQL Server身份验证。
由于某种原因,我无法在对话框中看到单选按钮。
对话框代码如下所示:
<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 :(得分:0)
将RadionButton的X和Y值更改为以下数字:
RadioButton X =&#34; 0 &#34; Y =&#34;的 0 强>&#34;
RadioButton X =&#34; 0 &#34; Y =&#34;的 20 强>&#34;
所以他们应该是这样的:
<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"/>
现在会出现单选按钮,但是&#39; Windows身份验证&#39;单选按钮将与您的标签重叠。因此,将 Y 值更改为 50 ,例如:
<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>
这应该可以解决问题。