Register | Login

ZettaCube Forum and Knowledge Base

Welcome to ZettaCube forum. Here you can discuss various issues regarding our ZeeControls product. If you want to contact our developers directly, please email to support@zettacube.com.

Please register to post a message. Registration is immediate and free. Return users please login here.

 
  Forum  Discussions  WebDock  FitParentContainer
Previous Previous
 
Next Next
New Post 1/7/2009 7:02 PM
  pdnf
1 posts
No Ranking


FitParentContainer 

I have WebDocs defined within a WebSplitterPanel content.  I have set the FitParent property to FitParentContainer but it does not seem to maximize the size of the WebDoc to the WebSplitterPanel.  Your demo project has this ability but when I download it I believe that the demo.aspx file is missing; which contains the outer WebSplitterPanels shown in your demo.  How do I get the inner WebDocs to maximize to the size of its parent WebSplitterPanel?

 
New Post 1/8/2009 3:52 AM
  ZettaCube Support
57 posts
No Ranking


Re: FitParentContainer 
Modified By ZettaCube Support  on 4/3/2009 1:01:38 AM)

Update (2009/4/1): Starting from ZeeControls 2.1, the default value of FitParent is FitParentContainer. And nested containers will fit to a parent panel that is a ZeeControls panel. That means a WebDock can now automatically fit to a parent WebSplitterPanel.  Actually you can nest different types of ZeeControls containers and panels that will fit to their parent containers.

So the following workaround is not required anymore.

---------------

At present, WebDock will not automatically fit to any parent container (except the browser window). In the FitParent property of WebDock, the value FitParentContainer behaves as FitNone.

For the time being, you can make use of the Client API to achieve the same effect.

Basically you need to add the following 2 things so that a WebDock will resize with a parent WebSplitterPanel:

1. Define a client-side handler for the OnClientPanelResized event of WebSplitterContainer
2. Set the Overflow property of the WebSplitterPanel to Hidden so that scrollbars won't be shown

Following is a sample (abridged) ASPX:

<body>
<script type="text/javascript">
    function PanelResizedHandler (panelId, oldWidth, oldHeight, newWidth, newHeight) {
        if (panelId == '<%= WebDockParent.ClientID %>') {
            ZCWD.GetContainer('<%= WebDock1.ClientID %>').SetDimensions(newWidth, newHeight);
        }
    }
</script>


    <form id="form1" runat="server">
    <div>
        <cc1:WebSplitterContainer runat="server" ID="WebSplitterContainer1" FitParent="FitWindow" Height="560px" Width="679px" OnClientPanelResized="PanelResizedHandler">
            <Panels>
                <cc1:WebSplitterPanel runat="server">
                    <Content>
                        Left Panel
                    </Content>
                </cc1:WebSplitterPanel>
                <cc1:WebSplitterPanel runat="server" Filled="True" ID="WebDockParent" Overflow="Hidden">
                <Content>
                <cc1:WebDock runat="server" ID="WebDock1" Height="524px" Width="512px">
                    <Panels>
                    ...
                    </Panels>
                </cc1:WebDock>
                </Content>
                </cc1:WebSplitterPanel>
            </Panels>
        </cc1:WebSplitterContainer>   
   
    </div>
    </form>
</body>

 

 
Previous Previous
 
Next Next
  Forum  Discussions  WebDock  FitParentContainer
Copyright 2009 by ZettaCube Limited