Dock resizing inconsitstant - Possibly bug?

4 posts, 0 answers
  1. Bexm
    Bexm avatar
    67 posts
    Member since:
    May 2007

    Posted 12 May 2008 Link to this post

    Hello

    I have a simple raddocklayout, with 2 dock zones and one raddock.
    The doc is acting as a toolbar and has a few buttons in it, and it will doc to the top or left of my content pane, which at the moment for testing purposes is a blank image.

    The dock starts off at the top and looks fine and all the buttons are horizontally next to each other, when I drag it to the left it resizes its self and the buttons fall below each other.

    If I drag the RadDock out of the dockzones the buttons fall horizontally next to each other again, but if I drag the Dock from the left DockZone straight to the top dockzone the RadDock doesn't resize, and I get a vertical scroll bar..

    It appears as a bug as it seems strange that it resizes when I drag to the left zone.

    Here is my code, could you advise if I am doing something wrong, or if it is indeed a bug.

    <style type="text/css">  
            #wrapper  
            {  
                text-align: left;  
                margin: 0px auto;  
                padding: 0px;  
                border: 0;  
                width: 600px;  
            }  
            #head  
            {  
                float: left;  
                width: 505px;  
            }  
            #corner  
            {  
                float: left;  
                width: 95px;  
                color: Red;  
            }  
            #side-a  
            {  
                height: 500px;  
                float: left;  
                width: 95px;  
                text-align: left;  
            }  
            #side-b  
            {  
                margin: 0;  
                float: left;  
                width: 505px;  
            }  
        </style> 
        <asp:ScriptManager ID="ScriptManager" runat="server" /> 
        <telerik:RadDockLayout ID="RadDockLayoutMain" runat="server">  
            <div id="wrapper">  
                <div id="corner">  
                </div> 
                <div id="head">  
                    <telerik:RadDockZone BorderWidth="0" ID="dockTop" Height="40" Width="500" runat="server" 
                        Orientation="Horizontal">  
                        <telerik:RadDock BorderWidth="0" ID="RadDock1" runat="server" DockHandle="Grip">  
                            <ContentTemplate> 
                                <asp:Button ID="button1" runat="server" Text="butt1" /> 
                                <asp:Button ID="button2" runat="server" Text="butt2" /> 
                                <asp:Button ID="button3" runat="server" Text="butt3" /> 
                                <asp:Button ID="button4" runat="server" Text="butt4" /> 
                            </ContentTemplate> 
                        </telerik:RadDock> 
                    </telerik:RadDockZone> 
                </div> 
                <div id="container">  
                    <div id="side-a">  
                        <telerik:RadDockZone Height="500" BorderWidth="0" ID="dockLeft" runat="server" Orientation="Vertical">  
                        </telerik:RadDockZone> 
                    </div> 
                    <div id="side-b">  
                       <img src="" width="500" height="500" /> 
                    </div> 
                </div> 
            </div> 
        </telerik:RadDockLayout> 

    Thanks

    Bex
  2. Sophy
    Admin
    Sophy avatar
    636 posts

    Posted 13 May 2008 Link to this post

    Hi Bexm,

    The behavior you observe is the expected behavior of the RadDock control. If you want to avoid dock's resizing when moving it from the top to the left zone and vice versa you should set the RadDockZone's property FitDocks to false. By default the FitDocks property of the RadDockZones is true which means that when a dock is docked in a vertical oriented zone it will take 100% of the zone's width. That is why, when you move the dock from the top to the left zone the dock takes 100% of the width of the left zone and therefore its width decreases. After that when you return the dock to the top zone its size remains the same as the zone's orientation is horizontal and scrollbars appear. I suggest you take a look at the Zone Orientation online example for reference.

    For your convenience I have attached a modified version of your page in which the problem does not exist.
    Let me know if you need further assistance.

    Best regards,
    Sophy
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Bexm
    Bexm avatar
    67 posts
    Member since:
    May 2007

    Posted 13 May 2008 Link to this post

    Hello Sophy

    Thanks for the reply.

    I want the Dock to resize, but from what you have said, shouldn't the Dock resize to 100% of the width of the top zone when I move it back, rather than staying the same width as the left zone?

    It seems it is totally ignoring the zones height, is it meant to do this?

    I have already been through the orientation example, but it doesn't really help!

    Bex
  4. Sophy
    Admin
    Sophy avatar
    636 posts

    Posted 16 May 2008 Link to this post

    Hi Bexm,

    The RadDock does not resize to 100% of the width of the top zone when you move it back but has the same width as the left zone because the Orientation of the top zone is Horizontal not Vertical. I have attached another version of your test page which demonstrates how to achieve the dock resizing  to take 100% of the zone's width when moving form the left to the top zone and vice versa.

    Best wishes,
    Sophy
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top