Popup Window Icon

9 posts, 1 answers
  1. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 08 Mar 2011 Link to this post

    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
  2. Rumen
    Admin
    Rumen avatar
    12848 posts

    Posted 10 Mar 2011 Link to this post

    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!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 10 Mar 2011 Link to this post

    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
  5. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 10 Mar 2011 Link to this post

    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
  6. Answer
    Rumen
    Admin
    Rumen avatar
    12848 posts

    Posted 15 Mar 2011 Link to this post

    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!
  7. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 15 Mar 2011 Link to this post

    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
  8. Rumen
    Admin
    Rumen avatar
    12848 posts

    Posted 17 Mar 2011 Link to this post

    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
  9. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 17 Mar 2011 Link to this post

    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);
    }
  10. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 19 Mar 2011 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017