ext.net filter on grid - extjs

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;
}

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

Gluon Mobile GridPane with percentages not working

I have a view with in the center a GridPane which fills the whole screen. The GridPane has percentages defined on all rows and all columns. On my Nexus 5X the layout works normal. When I install the app on a Zebra Scanner TC8000, which is an Android 4.4.3, the percentages are not respected. Instead roughly the upper 50% is shown and the rest disappears much like the screen is too small.
The resolution on the Zebra is much less of course, 480x800 vs 1080x1920 on the 5X but I expected that the components would scale down according to the percentages of the GridPane. Does anyone know what's going wrong.
Edit: I tried many different things and the best code I got atm is the code below. The problems this code has are:
- The first row takes up 55% of the screen height instead of the 30% that is configured.
- The components leave the screen in width by approximatly 50 - 100 pixels. If this one is solved the layout becomes acceptable.
<?xml version="1.0" encoding="UTF-8"?>
<?import com.gluonhq.charm.glisten.mvc.View?>
<?import javafx.geometry.Insets?>
<?import javafx.geometry.Rectangle2D?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<View fx:id="product" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.essers.pxl2016.scan.application.gluon.views.ProductPresenter">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
<top>
<HBox fx:id="buttonHBox" alignment="CENTER_LEFT" cacheShape="false" BorderPane.alignment="CENTER">
<children>
<Label fx:id="descriptionLabel">
<font>
<Font name="System Bold" size="15.0" />
</font>
<HBox.margin>
<Insets />
</HBox.margin>
</Label>
<Region HBox.hgrow="ALWAYS" />
<Button fx:id="exitButton" mnemonicParsing="false" text="Exit">
<HBox.margin>
<Insets />
</HBox.margin>
</Button>
</children>
</HBox>
</top>
<center>
<GridPane>
<columnConstraints>
<ColumnConstraints fillWidth="false" percentWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="20.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="50.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane hgap="4.0" vgap="4.0">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" percentWidth="15.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" percentWidth="15.0" />
<ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" percentWidth="45.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" percentWidth="25.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints percentHeight="7.5" vgrow="SOMETIMES" />
<RowConstraints percentHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="5.0" vgrow="SOMETIMES" />
<RowConstraints percentHeight="7.5" vgrow="SOMETIMES" />
<RowConstraints percentHeight="45.0" valignment="CENTER" vgrow="ALWAYS" />
<RowConstraints percentHeight="5.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<VBox alignment="CENTER" spacing="5.0" GridPane.rowIndex="4">
<children>
<Button fx:id="plusButton" alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#plusClicked" text="+" textAlignment="CENTER" VBox.vgrow="ALWAYS">
<VBox.margin>
<Insets />
</VBox.margin>
</Button>
<Button fx:id="minButton" alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#minClicked" text="-" textAlignment="CENTER" VBox.vgrow="ALWAYS">
<VBox.margin>
<Insets />
</VBox.margin>
</Button>
</children>
<GridPane.margin>
<Insets />
</GridPane.margin>
</VBox>
<Label text="Count" textAlignment="CENTER" GridPane.columnIndex="1" GridPane.rowIndex="3">
<font>
<Font size="11.0" />
</font>
</Label>
<Label alignment="CENTER" contentDisplay="CENTER" nodeOrientation="LEFT_TO_RIGHT" text="Scanned barcode" textAlignment="CENTER" GridPane.columnIndex="2" GridPane.rowIndex="3">
<font>
<Font size="11.0" />
</font>
<GridPane.margin>
<Insets left="5.0" />
</GridPane.margin>
</Label>
<Button maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#okClicked" text="OK" GridPane.columnIndex="3" GridPane.rowIndex="4">
<GridPane.margin>
<Insets />
</GridPane.margin>
</Button>
<Label text="Target">
<font>
<Font size="11.0" />
</font>
</Label>
<Label text="Scanned" GridPane.columnIndex="1">
<font>
<Font size="11.0" />
</font>
</Label>
<Label alignment="CENTER" text="Target barcode" GridPane.columnIndex="2">
<font>
<Font size="11.0" />
</font>
<padding>
<Insets left="5.0" />
</padding>
</Label>
<TextField fx:id="targetCountTextField" alignment="CENTER" disable="true" editable="false" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" text="5" GridPane.rowIndex="1" />
<TextField fx:id="countTextField" alignment="CENTER" maxHeight="1.7976931348623157E308" text="1" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.rowIndex="4" GridPane.rowSpan="2" GridPane.vgrow="ALWAYS" />
<TextField fx:id="targetBarcodeTextField" disable="true" editable="false" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" GridPane.columnIndex="2" GridPane.rowIndex="1">
<opaqueInsets>
<Insets left="5.0" />
</opaqueInsets>
</TextField>
<TextField fx:id="scannedCountTextField" alignment="CENTER" disable="true" editable="false" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" text="0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<TextField fx:id="scannedBarcodeTextField" maxHeight="1.7976931348623157E308" onKeyPressed="#handleKeyPress" GridPane.columnIndex="2" GridPane.rowIndex="4" GridPane.rowSpan="2">
<opaqueInsets>
<Insets left="5.0" />
</opaqueInsets>
</TextField>
<Button fx:id="skipButton" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#skipClicked" text="Skip" GridPane.columnIndex="3" GridPane.hgrow="ALWAYS" GridPane.rowIndex="1" GridPane.vgrow="ALWAYS" />
</children>
</GridPane>
<GridPane GridPane.rowIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="0.0" percentWidth="29.0" prefWidth="0.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="31.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="15.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="25.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Id:" />
<Label text="Location:" GridPane.rowIndex="1" />
<Label text="Description:" GridPane.rowIndex="2" />
<Label text="Comment:" GridPane.rowIndex="3" />
<Label text="Status:" GridPane.columnIndex="2" GridPane.rowIndex="1" />
<Label text="Unit:" GridPane.columnIndex="2" />
<Label fx:id="idLabel" GridPane.columnIndex="1" />
<Label fx:id="locationLabel" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label fx:id="longDescriptionLabel" wrapText="true" GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.rowIndex="2" />
<Label fx:id="commentLabel" wrapText="true" GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.rowIndex="3" />
<Label fx:id="statusLabel" GridPane.columnIndex="3" GridPane.rowIndex="1" />
<Label fx:id="unitLabel" GridPane.columnIndex="3" />
</children>
</GridPane>
<VBox GridPane.rowIndex="2" GridPane.vgrow="ALWAYS">
<children>
<Pane fx:id="pane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" VBox.vgrow="ALWAYS">
<children>
<StackPane fx:id="imagePane" alignment="TOP_LEFT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
<children>
<ImageView fx:id="imageView" onMouseClicked="#imageClicked" pickOnBounds="true" preserveRatio="true" StackPane.alignment="CENTER">
<viewport>
<Rectangle2D />
</viewport>
</ImageView>
<Button fx:id="videoButton" disable="true" mnemonicParsing="false" onAction="#videoButtonClicked" text="Video" visible="false" StackPane.alignment="TOP_RIGHT">
<StackPane.margin>
<Insets right="3.0" top="3.0" />
</StackPane.margin>
</Button>
</children>
</StackPane>
</children>
</Pane>
<Label fx:id="figLabel" alignment="TOP_LEFT" />
</children>
</VBox>
</children>
</GridPane>
</center>
</View>
You can reproduce the issue if you run your app on Desktop, and set the stage dimensions to 320x600:
#Override
public void postInit(Scene scene) {
scene.getWindow().setWidth(320);
scene.getWindow().setHeight(600);
}
Using ScenicView you'll notice that the view has 370 px width, because the minimum width for the top inner grid is 360 px.
While you haven't set any minimum value for any control, you can see that the styled buttons don't resize down properly, as the minimum width is set by css.
Try adding this to remove their minimum width value:
.view {
}
.button {
-fx-min-width: 10;
}
Now the view should be within the bound of the mobile screen:
The problem was that I put a button in a small width column. In SceneBuilder and on devices width high resolutions, the layout looked fine but when displayed on a small screen, the button became too wide for the column. In response, the View was resized to a bigger maximum width and because the width already filled the screen, it now exceeded the screen.
Imo the button should be resized or scaled down to fit the GridPane cell. Also, the minimum size of the button used in the calculations is quite wide, even though my button only had a plus-sign in it.

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.

Databinding in wpf as that of repeater in asp.net

I am having a repeater like this in asp.net
<asp:Repeater runat="server" ID="rptrExperience" OnItemDataBound = "itembound">
<ItemTemplate>
<div class="experience">
<a><asp:Label ID="Label13" class="accounts-link" runat="server" Text='<%#Eval("JobTitle") %>'></asp:Label></a> <br />
<a> <asp:Label ID="Label14" class="accounts-link" runat="server" Text='<%#Eval("Company") %>'></asp:Label></a><br />
<%-- <asp:Label ID="Label1" runat="server" Text='<%#Eval("town") %>'></asp:Label><br />
<asp:Label ID="Label15" runat="server" Text='<%#Eval("Location") %>'></asp:Label><br />--%>
<asp:Label ID="Label16" runat="server" Text='<%#Eval("Period") %>'></asp:Label><br />
<asp:Label ID="Label17" runat="server" Text='<%#Eval("Description") %>'></asp:Label><br />
<asp:Label ID="lblname" runat="server"></asp:Label>
<a id="ae" href="#?w=750" class=" floatleft poplight" rel="popup6" runat ="server" >Endorse <asp:Label ID="en" runat="server" Text='<%#Name(Eval("UserId")) %>'></asp:Label>'s Work in <asp:Label ID="en1" runat="server" Text='<%#Eval("Company") %>'></asp:Label></a>
<a id="te" runat="server" rel="tooltip" title="You can endorse your collegue or friend you have worked together.This is your professional opinion so keep it professional.Tip: Keep it clear and simple, Your friend can delete your endorsementif they are innappropriate. "><img src="images/icon-tips.png" width="14" height="15" alt="tips" /></a>
</div>
</ItemTemplate>
</asp:Repeater>
and binding data using linq
I want the same to displayed in a wpf application. I am new to wpf can any one help me out
I think ItemsControl will probably fit your need:
<ItemsControl ItemsSource="{Binding ...}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<!-- Template goes here ... -->
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>

ComboBox not showing on Dialog load

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

Resources