Aug 06, 2009, 8:28 AM
Control render complete query
I have a viewport with a west port that is collapsed by default.
<West minwidth="300" maxwidth="400" split="true" collapsible="true">
<ext:FormPanel id="pnlWest" runat="server" collapsed="true" BodyStyle="padding: 5px;" width="300" AutoScroll="true" title="Search">
<Body>
I have been asked to provide the port title vertically up the collapsed panel. Obviously text won't render vertically in explorer so I have created a gif image of the text. This is appended to the bar when it has finished rendering to the page.function ViewPortRendered()
{
var oDivCollapsedWestPannel = document.getElementById("pnlWest-xcollapsed");
var opContainer = document.createElement("DIV");
opContainer.setAttribute("id", "divImageHolder-xcollapsed");
var opImage = document.createElement("IMG");
opImage.setAttribute("src", "Images/SearchUp.gif");
opImage.setAttribute("height", "45px");
opImage.setAttribute("width", "15px");
opContainer.setAttribute("padding-left", "3px");
opContainer.setAttribute("style", "height:45px;width:15px;");
opContainer.appendChild(opImage);
oDivCollapsedWestPannel.appendChild(opContainer);
}
I do have an event I have been able to latch on to. It is the pluginLoaded event of a silverlight control hosted on the same page which only fires when the whole page has completely rendered. However, what if I didn't have the silverlight control. How would I know that the collapsed west port has finished rendering? I tried the Render event listener but that fires before the pnlWest-xcollapsed object has been created. There is an afterrender event for a viewport but this isn't supported by coolite. Any ideas?