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

Shadow Opacity

2 Answers 62 Views
Window
This is a migrated thread and some comments may be shown as answers.
Toxic
Top achievements
Rank 1
Toxic asked on 13 Jul 2011, 09:41 AM
Hi,

Is there any way to change the opacity of the background shadow on a rad alert?

Basically I want to use it as a screen sheild, to mostly (but not completely) hide the contents of the window behind. Until the user clicks the prompt when they return to their desk.

I intend to use a client side popup for this.

Is it possible to change this setting?

Cheers

Tox

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 13 Jul 2011, 11:36 AM
Hi Tox,

It is possible by modifying the CSS style of the modal overlay. Please note that this change would be global for the modal overlay for other RadWindows and the three dialog windows:

<style type="text/css">
    .TelerikModalOverlay
    {
        filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=90) !important;
        opacity: 0.9 !important;
          
    }
      
</style>

Another possible approach is to modify the overlay just for the RadAlert via JavaScript. I do not recommend this approach, as if things change in our code this hack would no longer work:
<asp:Button ID="Button2" Text="alert me" runat="server" OnClientClick="alertMe(); return false;" />

and the JavaScript:
function alertMe()
{
    var theAlert = radalert("warning!");
    var overlay = theAlert._modalExtender._backgroundElement;
    overlay.style.opacity = 0.9;
    overlay.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=90)";
}


Greetings,
Marin
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Toxic
Top achievements
Rank 1
answered on 13 Jul 2011, 03:39 PM
Thanks.

Will see which fits best for us.

Unfortunately the latter is probably the best for us as we use and awful lot of other rad windows......

Thanks for your help.

Tox
Tags
Window
Asked by
Toxic
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Toxic
Top achievements
Rank 1
Share this question
or