Jul 24, 2008, 4:29 PM
[CLOSED] ext:HtmlEditor in ext:Window
I have the following mark-up code:
<asp:UpdatePanel ID="upWinPanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<ext:Window ID="EditorWindow" runat="server" Title="<%$ Resources:LanguageFile, Note %>" MinHeight="600" MinWidth="800" Closable="True" Showonload="false" CloseAction="Hide" Maximizable="true" Modal="True" Icon="PageWhiteEdit">
<Content>
<ext:AnchorLayout ID="alWin" runat="server">
<ext:Anchor>
<ext:Panel ID="pnlWinMsg" runat="server" Height="0" AutoHeight="true" BodyStyle="background-color:#e4e4e4;" Border="False" AutoScroll="True" BodyBorder="False" Header="True" HideBorders="True">
<Content>
<asp:Label ID="lblErrorMsg" runat="server" CssClass="red" />
</Content>
</ext:Anchor>
<ext:Anchor>
<ext:FieldSet ID="fldsetEditorEmail" runat="server" Icon="EmailGo" Title="<%$ Resources:LanguageFile, SendByEmail %>" Collapsible="True" TitleCollapse="True" Cls="AssignmentFieldset" Collapsed="true" StyleSpec="margin:5px;" Height="135">
<Listeners>
<Collapse Handler="Ext.getCmp('btnSendEmail').hide();" />
<Expand Handler="Ext.getCmp('btnSendEmail').show();" />
</Listeners>
<Content>
... some textboxes with labels here ...
</Content>
</ext:FieldSet>
</ext:Anchor>
<ext:Anchor Horizontal="100%" Vertical="100%">
<ext:HtmlEditor ID="HtmlEditor" runat="server">
</ext:Anchor>
</ext:AnchorLayout>
</Content>
<Buttons>
<ext:Button ID="btnSendEmail" runat="server" Icon="EmailGo" AutoPostBack="false" Text="<%$ Resources:LanguageFile, EmailSend %>" OnClientClick="document.getElementById('hbtnEmail').click();" />
<ext:Button ID="btnSave" runat="server" Icon="Disk" AutoPostBack="false" Text="<%$ Resources:LanguageFile, Save %>" OnClientClick="document.getElementById('hbtnSave').click();" />
<ext:Button ID="btnNoteCancel" runat="server" Icon="Cancel" AutoPostBack="false" Text="<%$ Resources:LanguageFile, Cancel %>" OnClientClick="Editorwindow.hide();" />
</Buttons>
</ext:Window>
</ContentTemplate>
</asp:UpdatePanel>
Two issues that I have with this:1. This works perfeclty well and as expected when the window is displayed and HtmlEditor content is populated or empty. The fieldset collapses/expands and HtmlEditor's size is changed respectively to fit all the controls inside the window. However, when I start typing in the editor and when I reach the visible bottom of the entry field, the editor grows and occupies 100% of window height, making the fieldset above the editor disappear (scroll beyond visible boundaries of the window, no scrollbars displayed). This does not happen in FireFox, but happens in IE7. Is there any way to prevent editor from "growing" its height?
2. As you might see from the markup code above, the window is not shown on page load, and the fieldset in the window is collapsed by default. When I load the page, for about 1 second I see the fieldset content labels/texboxes on the page, which then disappear. I guess Ext rebuilds dom? When window is displayed, fieldset is collapsed as expected and behaves appropriately. Is there any way to prevent this "flicker" on page load?
Thank you!