ComboBox not showing on Dialog load - combobox

I have the following ComboBox declared in a custom Dialog:
<Control Id="EnvironmentCombobox" Type="ComboBox" Sorted="yes" ComboList="yes" Property="ENVIRONMENT" X="25" Y="110" Width="200" Height="15">
<ComboBox Property="ENVIRONMENT">
<ListItem Text="Development" Value="Development" />
<ListItem Text="SIT" Value="SIT" />
<ListItem Text="UAT" Value="UAT" />
<ListItem Text="Production" Value="Production" />
</ComboBox>
</Control>
When I run my installer and get to that dialog, the ComboBox doesn't show until I run my mouse over it. It also appears when if I hit a navigation button. If I leave and come back to the dialog, it is gone again, until I mouse over it or hit a navigation button.
I've tried setting Hidden="no" and increasing the height, but no luck.
Adding full files, per request in comments.
The above is in the EnvironmentDlg:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Dialog Id="EnvironmentDlg" Width="370" Height="270" Title="[ProductName] Setup">
<!-- Layout. -->
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<!-- Content. -->
<Control Id="Title" Type="Text" X="15" Y="15" Width="300" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}Choose environment for [ProductName]" />
<Control Id="InstallText" Type="Text" X="25" Y="70" Width="320" Height="80" Text="Choose the environment to which [ProductName] is being installed." />
<Control Id="EnvironmentCombobox" Type="ComboBox" Sorted="yes" ComboList="yes" Property="ENVIRONMENT" X="25" Y="110" Width="200" Height="15">
<ComboBox Property="ENVIRONMENT">
<ListItem Text="Development" Value="Development" />
<ListItem Text="SIT" Value="SIT" />
<ListItem Text="UAT" Value="UAT" />
<ListItem Text="Production" Value="Production" />
</ComboBox>
</Control>
<!-- Navigation. -->
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
<!-- Don't allow user to continue until they have selected an environment. -->
<Condition Action="disable">ENVIRONMENT = ""</Condition>
<Condition Action="enable"><![CDATA[ENVIRONMENT <> ""]]></Condition>
</Control>
<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>
</Dialog>
</UI>
</Fragment>
</Wix>
The sequence is in MyWixUI_Unsecured:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI Id="MyWixUI_Unsecured">
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="MsiRMFilesInUse" />
<DialogRef Id="PrepareDlg" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ResumeDlg" />
<DialogRef Id="UserExit" />
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="EnvironmentDlg">1</Publish>
<Publish Dialog="EnvironmentDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="EnvironmentDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="EnvironmentDlg">1</Publish>
</UI>
<UIRef Id="WixUI_Common" />
</Fragment>
</Wix>

The issue is regarding the Height of InstallText control in EnvironmentDlg.
Change the Height to 25
<Control Id="InstallText" Type="Text" X="25" Y="70" Width="320" Height="25" Text="Choose the environment to which [ProductName] is being installed." />
Full Code:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Dialog Id="EnvironmentDlg" Width="370" Height="270" Title="[ProductName] Setup">
<!-- Layout. -->
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<!-- Content. -->
<Control Id="Title" Type="Text" X="15" Y="15" Width="300" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}Choose environment for [ProductName]" />
<Control Id="InstallText" Type="Text" X="25" Y="70" Width="320" Height="25" Text="Choose the environment to which [ProductName] is being installed." />
<Control Id="EnvironmentCombobox" Type="ComboBox" Sorted="yes" ComboList="yes" Property="ENVIRONMENT" X="25" Y="110" Width="200" Height="15">
<ComboBox Property="ENVIRONMENT">
<ListItem Text="Development" Value="Development" />
<ListItem Text="SIT" Value="SIT" />
<ListItem Text="UAT" Value="UAT" />
<ListItem Text="Production" Value="Production" />
</ComboBox>
</Control>
<!-- Navigation. -->
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
<!-- Don't allow user to continue until they have selected an environment. -->
<Condition Action="disable">ENVIRONMENT = ""</Condition>
<Condition Action="enable"><![CDATA[ENVIRONMENT <> ""]]></Condition>
</Control>
<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>
</Dialog>
</UI>
</Fragment>
</Wix>
I will suggest you using WixEdit control for designing UI

Related

WPF WindowsFormsHost control is not woking showing error

I am using WindowsFormsHost to show DataGridView in my WPF application.
<wfi:WindowsFormsHost Name="winhost" Grid.Row="0" Width="930" Height="200" Margin="5,5,5,0" Visibility="Hidden">
<wf:DataGridView x:Name="dataGridViewOutlookMailList" ScrollBars="Both" AllowUserToAddRows="False" RowHeadersVisible="False" CellContentClick="dataGridViewOutlookMailList_CellContentClick">
<wf:DataGridView.Columns>
<wf:DataGridViewCheckBoxColumn Name="dataGridViewCheckBoxColumn3" HeaderText="" Width="25" Visible="True" />
<wf:DataGridViewTextBoxColumn Name="dataGridViewTextBoxColumn13" HeaderText="Outlook Entry ID" Width="100" Visible="false" />
<wf:DataGridViewTextBoxColumn Name="dataGridViewTextBoxColumn14" HeaderText="FullPath With FileName" Width="100" Visible="False" />
<wf:DataGridViewTextBoxColumn Name="dataGridViewTextBoxColumn15" HeaderText="Resume Name" Width="100" Visible="True" />
<wf:DataGridViewTextBoxColumn Name="dataGridViewTextBoxColumn18" HeaderText="Sender Name" Width="100" Visible="True" />
<wf:DataGridViewTextBoxColumn Name="dataGridViewTextBoxColumn17" HeaderText="Received By Name" Width="100" Visible="True" />
<wf:DataGridViewTextBoxColumn Name="dataGridViewTextBoxColumn16" HeaderText="Received" Width="100" Visible="True" />
<wf:DataGridViewTextBoxColumn Name="dataGridViewTextBoxColumn19" HeaderText="Sender Address" Width="100" Visible="True" />
<wf:DataGridViewTextBoxColumn Name="dataGridViewTextBoxColumn20" HeaderText="To" Width="100" Visible="True" />
<wf:DataGridViewTextBoxColumn Name="dataGridViewTextBoxColumn21" HeaderText="Bcc" Width="100" Visible="True" />
<wf:DataGridViewTextBoxColumn Name="dataGridViewTextBoxColumn22" HeaderText="Cc" Width="100" Visible="True" />
<wf:DataGridViewTextBoxColumn Name="dataGridViewTextBoxColumn23" HeaderText="Subject" Width="100" Visible="True" />
<wf:DataGridViewTextBoxColumn Name="dataGridViewTextBoxColumn24" HeaderText="Body" Width="100" Visible="True" />
<wf:DataGridViewCheckBoxColumn Name="dataGridViewCheckBoxColumn4" HeaderText="NotesActivity" Width="25" Visible="False" />
<wf:DataGridViewCheckBoxColumn Name="dataGridViewCheckBoxColumn5" HeaderText="Body As Attachment" Width="100" Visible="False" />
</wf:DataGridView.Columns>
</wf:DataGridView>
I am getting following error while mouse over on datagridview also the UI is not loaded properly. see the screen shot for details.
I am also using following code
WinForms.DataGridViewCellStyle ColStyle1 = new WinForms.DataGridViewCellStyle();
System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection();
pfc.AddFontFile(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + #"\NewZrr\OpenSans-Regular.ttf");
foreach (WinForms.DataGridViewColumn c in dataGridViewOutlookMailList.Columns)
{
c.DefaultCellStyle.Font = new System.Drawing.Font(pfc.Families[0], 8, System.Drawing.FontStyle.Regular);
}
pfc = null;
in my Window_Loaded method to change the font of datagridview. kindly guide me to resolve the issue.
The problem is that the PrivateFontCollection instance in the pfc variable goes out of scope, so when the DataGridViewCell is drawn for the first time the specified font cannot be loaded correctly.
Move the pfc instance outside the Window_Loaded method to prevent GC from collecting it, and do not set it to null, make it a long-living object.
Reference: Parameter is not valid when draw text in label with custom font

How to Replace Default icon in Visual Studio 2013 apache cordova application for ipad/iphone

I tried in different ways to replace default app icon but its not working for me.i added custom icons res/icons/ios in this path. when I build my cordova app on remote device(ipad) its always showing default app icon.if anyone help me to solve my problem? I also added following lines into my config.xml file.
*
<platform name="android">
<!--
ldpi : 36x36 px
mdpi : 48x48 px
hdpi : 72x72 px
xhdpi : 96x96 px
xxhdpi : 144x144 px
xxxhdpi : 192x192 px
-->
<icon src="res/android/ldpi.png" density="ldpi" />
<icon src="res/android/mdpi.png" density="mdpi" />
<icon src="res/android/hdpi.png" density="hdpi" />
<icon src="res/android/xhdpi.png" density="xhdpi" />
<icon src="res/android/xxhdpi.png" density="xxhdpi" />
<icon src="res/android/xxxhdpi.png" density="xxxhdpi" />
</platform>
<platform name="ios">
<!-- iOS 8.0+ -->
<!-- iPhone 6 Plus -->
<icon src="res/ios/icon-60-3x.png" width="180" height="180" />
<!-- iOS 7.0+ -->
<!-- iPhone / iPod Touch -->
<icon src="res/ios/icon-60.png" width="60" height="60" />
<icon src="res/ios/icon-60-2x.png" width="120" height="120" />
<!-- iPad -->
<icon src="res/ios/icon-76.png" width="76" height="76" />
<icon src="res/ios/icon-60-2x.png" width="152" height="152" />
<!-- iOS 6.1 -->
<!-- Spotlight Icon -->
<icon src="res/ios/icon-40.png" width="40" height="40" />
<icon src="res/ios/icon-40-2x.png" width="80" height="80" />
<!-- iPhone / iPod Touch -->
<icon src="res/ios/icon.png" width="60" height="60" />
<icon src="res/ios/icon-2x.png" width="120" height="120" />
<!-- iPad -->
<icon src="res/ios/icon-72.png" width="72" height="72" />
<icon src="res/ios/icon-72-2x.png" width="144" height="144" />
<!-- iPhone Spotlight and Settings Icon -->
<icon src="res/ios/icon-small.png" width="29" height="29" />
<icon src="res/ios/icon-small-2x.png" width="58" height="58" />
<!-- iPad Spotlight and Settings Icon -->
<icon src="res/ios/icon-50.png" width="50" height="50" />
<icon src="res/ios/icon-50-2x.png" width="100" height="100" />
</platform>
You need to open your project in xcode and find the Resources folder -> images.xsassets
http://ticons.fokkezb.nl/
above link is useful for create your icon and splash-screen for your ios application.
once that downloaded you drag and drop icons in appicon and splashscreen in lanchimage
I hope this work for you.

Check checkbox when another checkbox is checked

Here is my WIX:
<Control Id="FeatureOneBox" Type="CheckBox" Property="FEATUREONE" Text="Feature One" X="30" Y="87" Height="10" Width="200" CheckBoxValue="1" />
<Control Id="FeatureTwoBox" Type="CheckBox" Property="FEATURETWO" Text="Feature Two" X="30" Y="107" Height="10" Width="200" CheckBoxValue="1" />
<Control Id="FeatureThreeBox" Type="CheckBox" Property="FEATURETHREE" Text="Feature Three" X="30" Y="107" Height="10" Width="200" CheckBoxValue="1" />
<Control Id="CoreFeatureBox" Type="CheckBox" Property="INSTALLCORE" Text="!(loc.CoreFeatureBox)" X="30" Y="147" Height="10" Width="300" CheckBoxValue="1">
<Condition Action="enable"><![CDATA[FEATURETWO <> 1 AND FEATURETHREE <> 1]]></Condition>
<Condition Action="disable">FEATURETWO = 1 OR FEATURETHREE = 1</Condition>
</Control>
I want to require the Core feature if either feature two or three is selected. I can do this by altering the feature condition but, it the user unchecks both of those, unchecks Core, then rechecks one of those, I don't want to install the Core feature even though its checkbox is unchecked.
How can I check CoreFeatureBox at the same time I disable it?
If only I'd googled just a few minutes more!
This code is all I needed:
<Control
Id="CB1"
Type="CheckBox"
Property="myCheckboxResult"
CheckBoxValue="my value"
Text="Check the box please."
X="50"
Y="50"
Height="10"
Width="150">
<Publish Property="myCheckboxResult2" Value="my value" Order="1">myCheckboxResult</Publish>
<Publish Property="myCheckboxResult2" Value="{}" Order="2">NOT myCheckboxResult</Publish>
</Control>
<Control
Property="myCheckboxResult2"
Id="CB2"
Type="CheckBox"
CheckBoxValue="my value"
Text="Check the box please."
X="50"
Y="70"
Height="10"
Width="150" />
I added the <Publish/> nodes under FeatureTwoBox and FeatureThreeBox and everything's working.

Wix installer- Change Combobox Value Based on radio button change

In the Below Code i tried to change Combo box value when we selecting Radiobutton , but it is not changing
<Control Id="radioButtonGroupBox1" Type="RadioButtonGroup"
Property="INSTALL_CUSTOMSCALE" Height="34" Width="64" X="48" Y="99">
<RadioButtonGroup Property="INSTALL_CUSTOMSCALE">
<RadioButton X="5" Y="2" Height="15" Width="56"
Text="Custom" Value="Custom" />
<RadioButton X="5" Y="18" Height="15" Width="56"
Text="Scaleout" Value="Scaleout" />
</RadioButtonGroup>
<Publish Property="CUSTOM_OPTION" Value="Server1" ></Publish>
</Control>
<Control Id="cmbCustomOption" Type="ComboBox" Property="CUSTOM_OPTION"
Height="16" Width="166" X="116" Y="101" >
<ComboBox Property="CUSTOM_OPTION">
<ListItem Text="Select..." Value="Select..." />
<ListItem Text="Server1" Value="Server1" />
<ListItem Text="Server2" Value="Server2" />
<ListItem Text="Server3" Value="Server3" />
<ListItem Text="Server4" Value="Server4" />
</ComboBox>
</Control>
And Also how to set Combobox non editable(readonly)
To set combobox non editable just add "ComboList = yes"
<Control Id="cmbCustomOption" Type="ComboBox" Property="CUSTOM_OPTION" Height="16"
Width="166" X="116" Y="101" ComboList="yes">
<ComboBox Property="CUSTOM_OPTION">
<ListItem Text="Select..." Value="Select..." />
<ListItem Text="Server1" Value="Server1" />
<ListItem Text="Server2" Value="Server2" />
<ListItem Text="Server3" Value="Server3" />
<ListItem Text="Server4" Value="Server4" />
</ComboBox>
</Control>

ext.net filter on grid

have my store and my grid panel, i need to add a filter box to it , so added a topbar tag, that has the field box to filter.. and want to add listeners on it so i would be filterer while writing, the 2 functions as shown are filtergrid() and clearFilter()...what those 2 functions should be, knowing that the store is binded with code behind...
<ext:Store ID="Store1" runat="server">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="FULLNAME" />
<ext:RecordField Name="JOBTITLE" />
<ext:RecordField Name="PHONENUMBER1" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
<ext:Panel ID="Panel1" runat="server" Width="520" Height="300" Collapsible="true" Title="Add Attendies" Collapsed="true">
<TopBar>
<ext:Toolbar ID="Toolbar2" runat="server">
<Items>
<ext:ToolbarTextItem ID="ToolbarTextItem1" runat="server" Text="Filter:" />
<ext:ToolbarSpacer />
<ext:TriggerField ID="TriggerField1" runat="server" EnableKeyEvents="true">
<Triggers>
<ext:FieldTrigger Icon="Clear" />
</Triggers>
<Listeners>
**<KeyUp Fn="filtergrid()" Buffer="250" />
<TriggerClick Handler="clearFilter();" />**
</Listeners>
</ext:TriggerField>
</Items>
</ext:Toolbar>
</TopBar>
<Items>
<ext:BorderLayout ID="BorderLayout1" runat="server">
<West MarginsSummary="5 5 5 5">
<ext:GridPanel
ID="GridPanel1"
runat="server"
StoreID="Store1"
DDGroup="GridDDGroup"
EnableDragDrop="true"
StripeRows="true"
AutoExpandColumn="FULLNAME"
Width="250"
Title="All Contacts">
<ColumnModel>
<Columns>
<ext:Column Header="Contact Name" ColumnID="FULLNAME" Width="140" DataIndex="FULLNAME" />
<ext:Column Header="Title" ColumnID="JOBTITLE" Width="75" DataIndex="JOBTITLE" />
<ext:Column Header="Phone" ColumnID="PHONENUMBER1" Width="75" DataIndex="PHONENUMBER1" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
</SelectionModel>
<GetDragDropText Fn="getDragDropText" />
<Listeners>
<Render Fn="setDD" />
</Listeners>
</ext:GridPanel>
</West>
<Center MarginsSummary="5 5 5 0">
<ext:GridPanel
ID="GridPanel2"
runat="server"
StoreID="Store2"
DDGroup="GridDDGroup"
EnableDragDrop="true"
StripeRows="true"
AutoExpandColumn="FULLNAME"
Width="250"
Title="Meeting Attendies">
<ColumnModel>
<Columns>
<ext:Column ColumnID="Contact Name" Header="Contact Name" Width="140" DataIndex="FULLNAME" />
<ext:Column Header="Title" Width="75" DataIndex="JOBTITLE" />
<ext:Column Header="Phone Number" Width="75" DataIndex="PHONENUMBER1" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel2" runat="server" />
</SelectionModel>
<GetDragDropText Fn="getDragDropText" />
<Listeners>
<Render Fn="setDD" />
</Listeners>
</ext:GridPanel>
</Center>
</ext:BorderLayout>
</Items>
<BottomBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>
<ext:ToolbarFill ID="ToolbarFill1" runat="server" />
<ext:Button ID="Button1" runat="server" Text="Reset both grids">
<Listeners>
<Click Handler="Store1.loadData(Store1.proxy.data);Store2.removeAll();" />
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</BottomBar>
</ext:Panel>
so there is 2 functions that i have to write , one that filter an return the result to be written in the panel, and the other one is to clear and restore the datasource again.
You can apply a filter using the filterBy method and passing a delegate function which returns true or false based on some logic of your choosing and then remove the filter using clearFilter
In mode cody terms, something like this:
clearFilter() {
theGridPanel.store.clearFilter(false);
}
filterGrid() {
theGridPanel.store.filterBy(theFilterFunction)
}
theFilterFunction(record, id) {
if(record.data.aField === 'yellow') {
return true;
}
return false;
}

Resources