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

Popup Window Icon

8 Answers 112 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 08 Mar 2011, 01:53 PM
Hi,

How do you change the icon for the popup window?  

I know how to change it for normal windows but not the spellchecker window.

I'm assuming that some css will be needed?

Best Regards,

Jon

8 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 Mar 2011, 04:04 PM
Hi Jon,

I was able to rewrite the spellchecker dialog icon using the following CSS class:

<style type="text/css">
</style>


All the best,
Rumen
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jon
Top achievements
Rank 1
answered on 10 Mar 2011, 04:55 PM
Thanks Rumen,

That seems to be very open, will it not affect any other rad windows that share the page with the spellchecker?  Assuming that that is correct, is there something that will increase the specificness of it to just spellchecker windows?

Many thanks,

Jon
0
Jon
Top achievements
Rank 1
answered on 10 Mar 2011, 05:02 PM
Hi again Rumen,

Trying it and I was right, it does interfere with other popups on the page, overriding any custom images for them.

I just had a look at it in chrome and although I can see the rwIcon my css isn't that good for me to work out if a tweak can be applied.

Regards,

Jon
0
Accepted
Rumen
Telerik team
answered on 15 Mar 2011, 01:05 PM
Hello Jon,

Here is a way to change only the spellchecker dialog icon:

<telerik:RadSpell ID="RadSpell1" runat="server" ControlsToCheck="TextBox1" OnClientCheckStarted="OnClientCheckStarted" />
<asp:TextBox ID="TextBox1" runat="server">dassdas dasdasdas dasdas</asp:TextBox>
<script type="text/javascript">
    function OnClientCheckStarted(spell) {
        setTimeout(function () {
            var spellDialog = spell._dialogOpener._dialogContainers.SpellCheckDialog;
        }, 0);
    }
</script>

If the set_iconUrl method does not work for some reason, upgrade Telerik.Web.UI.dll to the latest Q3 2010 SP2 release (version 2010.3 1317).

Kind regards,
Rumen
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jon
Top achievements
Rank 1
answered on 15 Mar 2011, 02:41 PM
Many thanks Rumen. 

That works a treat.  The only issue that I still have is that obviously the icon doesn't show immediately and the other icon is visible for a couple of seconds.  Could a feature request be added so that we can tailor the icon prior to the window being visible?

Great work around though!

Best Regards,

Jon
0
Rumen
Telerik team
answered on 17 Mar 2011, 01:01 PM
You are welcome, Jon.

Could you please remove the timeout function from the provided solution and test the code again?

I hope that this will resolve the reported side effect.

Best regards,
Rumen
the Telerik team
0
Jon
Top achievements
Rank 1
answered on 17 Mar 2011, 03:12 PM
Hi Rumen,

I tried that (code shown below) but it doesn't work.  The spellDialog var gets created as undefined so I am assuming that the timeout function was present to delay until the window is open?

Regards,

Jon

function OnClientCheckStarted(spell) {
    //setTimeout(function() {
        var spellDialog = spell._dialogOpener._dialogContainers.SpellCheckDialog;
        spellDialog.set_iconUrl("/Images/Icons/16/spellcheck.png");
    //}, 0);
}
0
Svetlina Anati
Telerik team
answered on 19 Mar 2011, 02:38 PM
Hello Jon,

Indeed, it is needed to ensure that the RadWindow object is actually created and thus you need to use the timeout of 0. It will not cause any performance issue since it is not an actual timeout but it ensures that the code will work correctly. 

Greetings,
Svetlina
the Telerik team
Tags
Spell
Asked by
Jon
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Jon
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or