Location

13 posts, 0 answers
  1. Harsh Dara
    Harsh Dara avatar
    6 posts
    Member since:
    Jan 2010

    Posted 27 Jul 2010 Link to this post

    Hi

    How can i specify a location to open the DesktopAlter i.e. a specific point on the screen. I am trying to use this as an advanced tool tip screen but cannot specify X & Y coordinates to open this.

    Regards
    Harsh

  2. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 27 Jul 2010 Link to this post

    Hi Harsh Dara,

    Thank you for your question.

    As mentioned in the Defining the Alert’s Position on the Screen help article, you can define the position of the alert’s popup on the screen by using the ScreenPosition property which accepts values from the AlertScreenPosition enumerator. There are six possible positions you can choose from: TopLeft, TopCenter, TopRight, BottomLeft, BottomCenter, BottomRight.

    In other words, the position where the alert appears is pre-set and cannot be set to open at a specific X,Y position on the screen. We will log this request nevertheless and will implement it in case we see more interest in this feature.
     
    Since RadDesktopAlert does not support this functionality, you can try out RadScreenTip. The documentation on this component is bit scarce, bit you can start from this help article and let us know in case you have any questions.
     

    Regards,
    Vassil
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Harsh Dara
    Harsh Dara avatar
    6 posts
    Member since:
    Jan 2010

    Posted 27 Jul 2010 Link to this post

    Hi

    It would have been ideal if i could have used Desktop Alter for tips....but i will try ScreenTip and see if that can be useful for my purpose.

    Thanks
    Harsh

  5. Harsh Dara
    Harsh Dara avatar
    6 posts
    Member since:
    Jan 2010

    Posted 27 Jul 2010 Link to this post

    Hi

    Is it possible to use a ScreenTip for a RadLabel?

    Regards
    Harsh

  6. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 30 Jul 2010 Link to this post

    Hello Harsh Dara,

    As far as I understand from your conversation with my colleague Deyan in your ticket "Location", you have already found how to assign a RadOffice2007ScreenTipElement to RadLabel. However, I would suggest that you use the following elegant API to assign your screentip instance:
    this.radLabel1.LabelElement.ScreenTip = screenTip;

    I hope this helps.

    Kind regards,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 24 Sep 2010 Link to this post

    Hi, 
    I'd also like to see the Desktop alert have specific positions. For example, I might like to place it to pop up in the bottom right hand corner of a specific dialogue window. 
    Richard
  8. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 29 Sep 2010 Link to this post

    Hello Richard,

    Thank you for your feedback.

    You can vote for the desired feature here.

    In case you have additional feedback to share, feel free to contact us.

    All the best,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Mike
    Mike avatar
    3 posts
    Member since:
    Mar 2014

    Posted 01 Oct 2014 Link to this post

    I need to capture the DesktopAlert's OnMove or locationchanged event to
    control when the user drags the DesktopAlert too far off the screen.  
    Since the DesktopAlerts job is to keep the user informed, we can not let
    one user move it off the screen and then another user come along later
    and not see the notification.  I know the desktopAlert is not supposed
    to be dragged off the screen but it can be moved to the edge of the
    screen with very few pixels still showing.  If you drag it to the bottom
    of the Windows screen where the taskbar is, it can actually be stuck
    where it can not be moved again.
  10. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 06 Oct 2014 Link to this post

    Hello Mike,

    Thank you for writing.

    It is appropriate to use the RadDesktopAlert.Popup.LocationChanged event and manipulate the location of the popup if it exceeds the screen boundaries. Here is a sample code implementation:
    private void radButton1_Click(object sender, EventArgs e)
    {
        this.radDesktopAlert1.Popup.LocationChanged += Popup_LocationChanged;
        this.radDesktopAlert1.CaptionText = "New E-mail Notification";
        this.radDesktopAlert1.ContentText = "Hello Jack, I am writing to inform you " +
                                            "that the planning meeting scheduled for Wednesday has been postponed and" +
                                            "it will eventually be rescheduled, possibly for the next Tuesday";
        this.radDesktopAlert1.Show();
    }
     
    int x = 0;
    int y = 0;
     
    private void Popup_LocationChanged(object sender, EventArgs e)
    {
        DesktopAlertPopup popup = sender as DesktopAlertPopup;
        if (popup != null)
        {
            Size screenSize = new Size(Screen.AllScreens[Screen.AllScreens.Length - 1].Bounds.Width * Screen.AllScreens.Length,
                Screen.PrimaryScreen.Bounds.Height);
            x = popup.Location.X;
            y = popup.Location.Y;
            
            if (popup.Location.X < 0)
            {
                x = 0;                 
            }
            else if (popup.Location.X + popup.DisplayRectangle.Width > screenSize.Width)
            {
                x = screenSize.Width - popup.DisplayRectangle.Width;
            }
     
            if (popup.Location.Y < 0)
            {
                y = 0;
            }
            else if (popup.Location.Y + popup.DisplayRectangle.Height > screenSize.Height)
            {
                y = screenSize.Height - popup.DisplayRectangle.Height;
            }
     
            if (popup.Location.X != x || popup.Location.Y != y)
            {
                popup.Location = new Point(x, y);
            }
        }
    }

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  11. Mike
    Mike avatar
    3 posts
    Member since:
    Mar 2014

    Posted 07 Oct 2014 in reply to Dess Link to this post

    Desislava,

     

    I do not see the option for “LocationChanged” (see below)

     



     

    To clarify what we are doing, here is the scenario:

    (Attached)

    Our software starts up and the customer chooses a configuration
    that might or might not be a simulator.  If it is a simulator, then we
    popup the desktop alert and allow the customer to move it, in case it is
    blocking other items.

    If the customer drags it off the screen, we have a problem
    because it is an IMPORTANT message that needs to be visible as all times. 
    Right now, your desktopalert can be dragged to show just one pixel.  We
    cannot have that.  We always have to have the entire desktopalert fully
    visible.

     

    Thanks,

    Mike

  12. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 09 Oct 2014 Link to this post

    Hello Mike,

    Thank you for writing back.

    In order to subscribe to the LocationChanged event, you should use the AddHandler statement. The AddHandler and RemoveHandler msdn article is quite useful about subscribing to and unsubscribing from an event. The provided code snippet from my previous post does not allow the DesktopAlert to goes outside the screen.

    If it happens to need code conversion between C# and VB, feel free to use our free online Code converter.

    I hope this information helps. If you have any additional questions, please let me know.

    Regards,
    Desislava
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  13. Mike
    Mike avatar
    3 posts
    Member since:
    Mar 2014

    Posted 09 Oct 2014 in reply to Dess Link to this post

    Unfortunately, there is not an event on the DesktopAlert for LocationChanged (See attached)  Based on the information provided, I believe the answer is no.  It might be that the version that I have does not support it.  Unfortunately, we are in the first round of testing and changing to a new version will effect too many components.  I see the only solution is for me to write my own control.
  14. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 09 Oct 2014 Link to this post

    Hello Mike,

    Thank you for writing back.

    As I mentioned in my post from 06-Oct-2014, the LocationChanged event is relevant for the RadDesktopAlert.Popup, not the RadDesktopAlert itself.

    I hope this information helps. If you have any additional questions, please let me know.

    Regards,
    Desislava
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready