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

RadWindow / RadRotator / RadImage with AutoSize

1 Answer 136 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Vavřík
Top achievements
Rank 2
Vavřík asked on 23 Feb 2012, 01:59 PM
Hi...

I have RadWindow containing only RadRotator with RadBinaryImage connected to underlaying database with images. My goal is to create an image gallery browser with RadWindow / RadRotator "autosize" behavior. That means RadWindow and RadRotator should have changed its width / height according to image pulled from database whenever active / shown image is changed. How can I achieve that...? I suppose to handle "autosize" behavior in OnClientShowing event but I do not know how... :-/

Thanks a lot for any advice.

Luboš

1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 27 Feb 2012, 04:42 PM
Lubos:

In researching this, it appears that RadRotator does not directly implement a resize method within its client-side API.

You can use the RadWindow Client-Side API "set_height" and "set_width" in pixels to an appropriate size for each new image.

Then you can use the window.onresize event to explicitly set the "style.width" and "style.height" properties of the RadRotator element based on the dimensions of each new image pulled from the database.

You can reference the RadRotator resizing issue forum thread for insights on doing this. And, also refer to the help stretching the rotator horizontaly for a better understanding of resizing the RadRotator.

Hope this helps you.
Tags
Rotator
Asked by
Vavřík
Top achievements
Rank 2
Answers by
Richard
Top achievements
Rank 1
Share this question
or