This is a migrated thread and some comments may be shown as answers.

popup window size scenarios

1 Answer 198 Views
Window
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Albert Shenker asked on 14 Feb 2011, 06:10 PM
I use RadWindow to pup up various dialog windows and forms for my users. I almost always specify the height and width of the popup in order to display the form properly. What is happening is, if the user pops the form up on a screen which doesn't have sufficient height available (due to too many browser toolbars, or small screen size overall), then the RadWindow header gets cut off altogether and the user is not able to drag the window down (because the header is not visible). Not being able to get access to the rad window header also means the close, min/max buttons are not visible, which could be useful to try and display the window properly in their available screen size. In the future, I will probably be able to implement some funcitonality which checks the user's available screen height and opens the window to a height value less than this. However, is there some built-in rad window funcitonality that can prevent the header from being hidden? I have attached a screen capture of an extreme example where the header gets cut off because of a lack of available screen height.

1 Answer, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 15 Feb 2011, 02:14 PM

Hello Albert,

You could handle the RadWindow's OnClientShow or the button that opens the window's click event. You then just resize the window to be a percentage of the window's width and height.This will ensure the window is always visible regardless of screen size. Like so:

var manager = GetRadWindowManager();
var rwHelp = manager.getWindowByName("rwHelp");
rwHelp.show();
  
 // get width/height - 80% of available window width/height
var width = $telerik.$(window).width() * 0.8;
var height = $telerik.$(window).height() * 0.95;
  
rwHelp.setSize(width, height);
rwHelp.center();

I'm resizing the window to be 80% of the window's width and height. I'm also using the RadWindowManager, but you can change the rwHelp call to the RadWindow itself, if that's you're scenario.

I hope that helps.
Tags
Window
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Answers by
Cori
Top achievements
Rank 2
Share this question
or