Sep 01, 2018, 2:07 PM
Thanks Fabricio,
Replacing Ext.NET label with more basic component, and then adjusting the height property as needed, worked.
I chose to stick with Visible = false, rather than Hidden = true, because I read somewhere that Hidden still uses resources to render things, but just doesn't display them. And visible will only instantiate when set to true.
Good news is that sticking to the Visible approach, the dynamic adjusting of the window contents still works if user stretches it.
THanks,
Replacing Ext.NET label with more basic component, and then adjusting the height property as needed, worked.
I chose to stick with Visible = false, rather than Hidden = true, because I read somewhere that Hidden still uses resources to render things, but just doesn't display them. And visible will only instantiate when set to true.
Good news is that sticking to the Visible approach, the dynamic adjusting of the window contents still works if user stretches it.
THanks,
<ext:Window runat="server" ID="Questionaire" Visible="false" Width="475" BodyPadding="20" Modal="true" CloseAction="Destroy">
<LayoutConfig>
<ext:VBoxLayoutConfig Pack="Center" Align="Stretch"></ext:VBoxLayoutConfig>
</LayoutConfig>
<Items>
<ext:Container runat="server" Layout="HBoxLayout" MarginSpec="12 15 5 15">
<LayoutConfig><ext:HBoxLayoutConfig Pack="Center"/></LayoutConfig>
<Items>
<ext:Component runat="server" ID ="QGreeting" Html ="Would you let us know how we're doing?" StyleSpec="font-size:15px;" Height="18" />
</Items>
</ext:Container>
<ext:Container runat="server">
<Items>
<ext:Component runat="server" Html="<hr/>" />
</Items>
</ext:Container>
<ext:Container runat="server" Layout="HBoxLayout" MarginSpec="12 15 5 15">
<LayoutConfig><ext:HBoxLayoutConfig Pack="Center" /></LayoutConfig>
<Items>
<ext:Component runat="server" Html="How likely are you to recommend us to a friend or colleague?"/>
</Items>
</ext:Container>
<ext:Container runat="server" Layout="HBoxLayout">
<LayoutConfig><ext:HBoxLayoutConfig Pack="Center" /></LayoutConfig>
<Items>
<ext:RadioGroup runat="server" ID="PromoterScore" Flex="1">
<Items>
<ext:Radio runat="server" ID="Score1" BoxLabel="1" InputValue="1" Flex="1"/>
<ext:Radio runat="server" ID="Score2" BoxLabel="2" InputValue="2" Flex="1"/>
<ext:Radio runat="server" ID="Score3" BoxLabel="3" InputValue="3" Flex="1"/>
<ext:Radio runat="server" ID="Score4" BoxLabel="4" InputValue="4" Flex="1"/>
<ext:Radio runat="server" ID="Score5" BoxLabel="5" InputValue="5" Flex="1"/>
<ext:Radio runat="server" ID="Score6" BoxLabel="6" InputValue="6" Flex="1"/>
<ext:Radio runat="server" ID="Score7" BoxLabel="7" InputValue="7" Flex="1"/>
<ext:Radio runat="server" ID="Score8" BoxLabel="8" InputValue="8" Flex="1"/>
<ext:Radio runat="server" ID="Score9" BoxLabel="9" InputValue="9" Flex="1"/>
<ext:Radio runat="server" ID="Score10" BoxLabel="10" InputValue="10" Flex="1"/>
</Items>
</ext:RadioGroup>
</Items>
</ext:Container>
<ext:Container runat="server" Layout="HBoxLayout" MarginSpec="-8 8 0 4">
<Items>
<ext:Component runat="server" Html="Not Likely" StyleSpec="font-size:xx-small" />
<ext:Panel runat="server" Flex="1" />
<ext:Component runat="server" Html="Very Likely" StyleSpec="font-size:xx-small" />
</Items>
</ext:Container>
<ext:Container runat="server" Layout="HBoxLayout" Margin="15">
<LayoutConfig><ext:HBoxLayoutConfig Pack="Center" /></LayoutConfig>
<Items>
<ext:Component runat="server" Html="Any comments or suggestions, for us?"/>
</Items>
</ext:Container>
<ext:TextArea runat="server" ID="Suggestions" Flex="1"/>
</Items>
<BottomBar>
<ext:Toolbar runat="server" Layout="HBoxLayout" ID="QuestionaireBottomBar">
<LayoutConfig>
<ext:HBoxLayoutConfig Pack="End" />
</LayoutConfig>
<Items>
<ext:HyperlinkButton runat="server" ID="DeferQ" Text="Defer until next quarter">
<Listeners>
<Click Handler="#{Questionaire}.close();" />
</Listeners>
</ext:HyperlinkButton>
<ext:Button runat="server" ID="SubmitQ" Text="Submit">
<Listeners>
<Click Handler="#{Questionaire}.close();" />
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</BottomBar>
<Listeners>
<BeforeRender Handler="var curHours = (new Date()).getHours(); var curPeriod = 'morning'; if (curHours < 12 ) {curPeriod = 'morning';} else if (curHours < 17) {curPeriod = 'afternoon';} else {curPeriod = 'evening';} #{QGreeting}.setHtml('Good '+ curPeriod +'! Would you let us know how we\'re doing?');"/>
<BeforeClose Handler="App.direct.LogQuestionaireFeedback();" />
</Listeners>
</ext:Window>