WIX equivalent of a C# textbox?
I'm staring at this page wondering which control is a textbox. Seems like 开发者_StackOverflow社区it should be obvious, but I don't see it.
http://wix.sourceforge.net/manual-wix2/wix_xsd_control.htm
Also, is there a built-in "Browse" button to select a file from disk? Or do you have to code all that yourself?
Thanks,
Neal
I finally found the textbox (second one below). It was a matter of setting the Type="Edit".
When I was looking at the web page mentioned, I was first looking only at "children" thinking that I would see a textbox there.
<Control Id="Description2" Type="Text" X="135" Y="140" Width="220" Height="20" Transparent="yes"
NoPrefix="yes" Text="Full path to settingsFile:" />
<Control Id="UserSettingsFileName" Type="Edit"
X="140" Y="150" Width="160" Height="80" Property="SettingsFilename"
Text="C:\Path\SettingsFileGenerator.xml">
The initial value of the edit/box was not set to the text I specified. Any ideas on that? Do I have to set the property value outside of the control?
But if there is an reasonably easy-to-use "browse"/file-picker, I'd like to know about that too.
The wix sources contain a BrowseDlg.wxs
file. This file defines the dialog which is used in WixUI_InstallDir
to allow the user to enter or browse for the install path, which is exactly the type of functionality you need.
It looks like you just have to use the Type "PathEdit". You also have to give the property where you want the result to be stored, in this case _BrowseProperty
:
<Control Id="PathEdit" Type="PathEdit"
X="25"
Y="202"
Width="320"
Height="18"
Property="_BrowseProperty"
Indirect="yes" />
精彩评论