Position set to center and Window Resize

6 posts, 0 answers
  1. mc2000
    mc2000 avatar
    48 posts
    Member since:
    Nov 2009

    Posted 22 Dec 2010 Link to this post

    Is there a way to have the RadTooltip (relative to browser window, centered) change position on Window resize so that it is always centered (without having to do a refresh)? Thanks.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Dec 2010 Link to this post

    Hello,


    Positioning a RadToolTip relative to the browser window can be achieved by setting the RelativeTo property to BrowserWindow and the Position property to the desired value.
    Checkout the demo: ToolTip / Relative to


    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. mc2000
    mc2000 avatar
    48 posts
    Member since:
    Nov 2009

    Posted 23 Dec 2010 Link to this post

    Thanks for the answer, but I'm interested in window resize, not window load. I already have the properties set to BrowserWindow and center -- it just doesn't change when resizing the window unless I refresh afterwards. Regards.
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 24 Dec 2010 Link to this post

    Hello mc2000,

     The RadToolTip does not have a public client API which allows to move it around because the purpose of the control is to popup relative to an element. Despite this I prepared for you a sample demo which achieves what you need - you can find it attached.

    Note, however, that it uses the private _setPopupVisible method and it is not recommended to use private methods because in case it changes on our side and upgrade you could face problems.

    If you want you can use the provided solution or you could consider using  the RadWindow control which exposes a moveTo method.

    I hope that my reply is helpful and I wish you happy holidays!

    Best wishes,
    Svetlina
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  6. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 24 Dec 2010 Link to this post

    Hi mc2000,

     I quick follow up - please, note that the provided code is just a simple demonstration on how to move the tooltip and you should use the logic as a start point and extend it further according to your scenario. One thing you might need is to check whether the tooltip is visible by using tooltip.isVisible() and then move it or check whether it has been created, etc.

    Kind regards,
    Svetlina
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  7. mc2000
    mc2000 avatar
    48 posts
    Member since:
    Nov 2009

    Posted 27 Dec 2010 Link to this post

    Actually, with the upgrade caveat, this works exactly as I need it to...thank you. For anyone else who may be downloading this, do make sure you explicitly set the tooltip height and width. Mine was being sized by the containing content and, for this scenario, it will not work.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017