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

Auto-sizing window height

4 Answers 185 Views
Window
This is a migrated thread and some comments may be shown as answers.
Chad Strawinski
Top achievements
Rank 1
Chad Strawinski asked on 23 Feb 2010, 05:25 PM
I'm looking for a way to only auto-size the height of a window (I need a fixed width) to its contents. The windows are created in Page_Init() and the content comes from a database which is also loaded in Page_Init(). The auto-sizing seems to be acting a little strange - the height of the window is too large and the values I set for the top and left properties seem to get ignored. It looks like the width is sizing to the image width... which is what you would expect, but I want to use a fixed width anyway. Enabling autosize seems to ignore any width values explicitly set. Any suggestions?

Thanks,
Chad

4 Answers, 1 is accepted

Sort by
0
Chad Strawinski
Top achievements
Rank 1
answered on 23 Feb 2010, 05:34 PM
Setting the width in my content explicitly using CSS seemed to work around the sizing issue. If I explicitly set the width of the content, it auto-sizes to that width, but I still have the problem with my values for the top and left properties having no effect. It appears to automatically center in the browser window. I use the OffsetElementID property as well to position the windows relative to another control, if that helps. The windows I have that do not have auto-size enabled are positioned like I expect them to be, just the autosized one is not.

thanks
0
Georgi Tunev
Telerik team
answered on 24 Feb 2010, 08:50 AM
Hi Chad,

The current implementation of the AutoSize functionality sizes the window both in width and height and at this point we don't consider changing it. In scenario like yours we would suggest to use the client-side API (setSize()) to size the RadWindow to the desired dimensions once your page is loaded.


Regards,
Georgi Tunev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Chad Strawinski
Top achievements
Rank 1
answered on 24 Feb 2010, 03:18 PM
Georgi,

Thanks for your reply. What about the auto-centering that appears to be happening with auto-sizing?

Thanks,
Chad
0
Georgi Tunev
Telerik team
answered on 25 Feb 2010, 12:31 PM
Hi Chad,

RadWindow is not centered when AutoSize is fired -  actually the control size itself proportionally, though depending on your exact page's setup, it may look like center() is called.

Regards,
Georgi Tunev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Window
Asked by
Chad Strawinski
Top achievements
Rank 1
Answers by
Chad Strawinski
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or