Dec 18, 2009, 1:40 PM
[CLOSED] panel autoheight
I am trying to do the following. I have a viewport with Borderlayout. In North Section I have Panel which I want the Panel to expand height based on weather the wc_Expander with ID "expand1" is shown. I have JS script which when click on the div will show/hide the additional text. I added
Ext.getCmp("pnlTop").syncSize(); in the pnlBottom, I have a grid that is inserted via code behind. I have enclosed screenshot. any suggestions.
thanks
idriss
Ext.getCmp("pnlTop").syncSize(); in the pnlBottom, I have a grid that is inserted via code behind. I have enclosed screenshot. any suggestions.
thanks
idriss
<ext:ViewPort ID="ViewPort1" runat="server">
<Body>
<ext:BorderLayout ID="BorderLayout1" runat="server">
<North MarginsSummary="5 5 5 5">
<ext:Panel ID="pnlTop" runat="server" Header="false" Frame="false" AutoHeight="true"
BodyStyle="padding: 5px;background-color:#ffffff;" >
<Body>
<div >
<div style="float: left; width: 49%;">
<label class="tdText">
<input type="checkbox" id="cbComplete" onclick="changeIcon(this, document.getElementById('hfSection').value)" />Mark
this section as complete and accurate</label>
<br />
<div style="width: 100%;">
<!-- BEGIN EXPAND -->
<wc:wc_Expander runat="server" ID="expand1" MessageHeader="Additional Information"
MessageBody="lots of text here. lots of text here lots of text herelots of text herelots of text here
lots of text here lots of text here lots of text here lots of text here lots of text here lots of text here
lots of text here lots of text here lots of text here lots of text here lots of text here lots of text here lots of text here" />
<!-- END EXPAND -->
</Body>
<Listeners>
<BodyResize Handler="#{pnlTop}.el.repaint();" />
<Resize Handler="var newHeight=pnlTop.lastSize.height; if (newHeight == undefined) {newHeight=125};pnlTop.setHeight(newHeight);el.autoHeight = true; " Delay="50" Scope="this" />
</Listeners>
</ext:Panel>
</North>
<Center MarginsSummary="0 5 5 5">
<ext:Panel ID="pnlBottom" runat="server" Frame="true" Header="false">
<Body>
</Body>
</ext:Panel>
</Center>
</ext:BorderLayout>
</Body>
</ext:ViewPort>