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  How to Set Width of the panels Initially based on the IE window width
Previous Previous
 
Next Next
New Post 8/2/2010 3:53 AM
Unresolved
  Aslam
10 posts
No Ranking


How to Set Width of the panels Initially based on the IE window width  
Modified By Aslam  on 8/2/2010 3:22:27 AM)

 

Dear Tech-Supporter,

                                        I need to set the Width and state of the Panel based on IE window width as provided below.

Based on the Screeen width (i.e;if  it is > 1200 pixels) the initial settings should  be as mentioned below..

  • The left  panel will be set to be at 20% of the IE window width initially
  • The right panel will be set at 40% of the IE window width initially
  • Content window should take up the 40% left

Can you provide the Information regarding this Query.

 
New Post 8/2/2010 1:51 PM
  ZettaCube Support
64 posts
No Ranking


Re: How to Set Width of the panels Initially based on the IE window width  

 Dear Aslam,

 
I think you might want to set the width of the panels based on the current width of the parent WebDock, instead of the screen size.  (Because no matter how large the screen is, the size of the browser window might be smaller.)
 
 
In essence, to get the size of the WebDock control:
 
var container = ZCWD.GetContainer("<%= WebDock1.ClientID %>");
var dim = container.GetDimensions();
// Outer dimensions will be returned in dim.width and dim.height
 
To get a panel by ID, and set its width (actually its PreferredSize):
 
var panel = ZCWD.GetPanel("<%= LeftDockPanel.ClientID %>");
panel.SetPreferredSize(200);
 
You may also set the docking state with:
 
panel.SetDockingState(1);
 
 
Hope this can answer your query.
 
Regards,
 
Technical Support
ZettaCube Limited
 
 
New Post 8/11/2010 6:48 AM
  Aslam
10 posts
No Ranking


Re: How to Set Width of the panels Initially based on the IE window width  

                     Here I need to vary the Panel widths and panel's Docking state of the Web-Dock is based  on the Screen Resolution only .I'm able to get the Screen width in Javascript as 'screen.width' .And By using client API, I'm also able to set the width,state of the Panel .But,when I tried to change the Resolution of the System and run the Application.

              I'm getting the Javascript Exception as "Microsoft JScript runtime error : 0 is Null or Not an Object" in a Dynamic page Named as "WebResource_2.axd?d=......" page.It is pointing to a variable with Name 'a' and showing the Exception as mentioned above.For one type of  Resolution it is working fine but when changinbg  from one Resolution to another  I'm getting  this Issue.

                                 I checked the suggestion provided in the above post by considering the width of the Container.But the Differance between  'screen.width' to Container's width is very high. Can you please suggest how to resolve the above Issue in a better manner.

 
New Post 8/11/2010 2:49 PM
  ZettaCube Support
64 posts
No Ranking


Re: How to Set Width of the panels Initially based on the IE window width  

Hi,

May we learn more about your scenario?  After you changed the screen resolution, have you closed the browser, reopened it and then load your web app again? If not, please try and see if the error persists.

If you have already done so, could you please tell us the resolution that is having the error, and if possible, pass us a sample project that can demo the problem?

Thanks

 

 
Previous Previous
 
Next Next
  Forum  Discussions  WebDock  How to Set Width of the panels Initially based on the IE window width
Copyright 2009 by ZettaCube Limited