[CLOSED] Ext.net "questionaire" message box

Page 2 of 2 FirstFirst 12
  1. #11
    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,


    <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>
  2. #12
    Great! Glad you could find a way that worked best for you. I really didn't try again the visible setting after doing the layout-driven setup, but it makes sense to work, as it is going to keep components sized no matter the dimensions (well, to the point where it makes sense).

    Thanks for sharing the snippet that best worked for you, I believe we may mark this thread as closed now then, right?
    Fabrício Murta
    Developer & Support Expert
  3. #13
    yes, we're all good. Please do close out, thanks
Page 2 of 2 FirstFirst 12

Similar Threads

  1. [CLOSED] "Stop running script" message in IE 8 in line chart
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 24, 2014, 5:54 AM
  2. [CLOSED] Change "loading" message during store load
    By feanor91 in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 28, 2013, 7:38 AM
  3. Replies: 4
    Last Post: Feb 25, 2013, 4:38 PM
  4. Replies: 6
    Last Post: Nov 15, 2011, 2:02 AM
  5. Replies: 3
    Last Post: Sep 22, 2010, 10:30 AM

Posting Permissions