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

Location

17 Answers 414 Views
DesktopAlert
This is a migrated thread and some comments may be shown as answers.
Harsh Dara
Top achievements
Rank 1
Harsh Dara asked on 27 Jul 2010, 02:00 PM
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

17 Answers, 1 is accepted

Sort by
0
Vassil Petev
Telerik team
answered on 27 Jul 2010, 04:18 PM
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
0
Harsh Dara
Top achievements
Rank 1
answered on 27 Jul 2010, 05:16 PM
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

0
Harsh Dara
Top achievements
Rank 1
answered on 27 Jul 2010, 05:32 PM
Hi

Is it possible to use a ScreenTip for a RadLabel?

Regards
Harsh

0
Nikolay
Telerik team
answered on 30 Jul 2010, 01:37 PM
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
0
Richard Slade
Top achievements
Rank 2
answered on 24 Sep 2010, 11:38 AM
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
0
Nikolay
Telerik team
answered on 29 Sep 2010, 10:20 AM
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
0
Mike
Top achievements
Rank 1
answered on 01 Oct 2014, 08:51 PM
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.
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 06 Oct 2014, 10:01 AM
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.
 
0
Mike
Top achievements
Rank 1
answered on 07 Oct 2014, 02:06 PM
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

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Oct 2014, 01:22 PM
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.

 
0
Mike
Top achievements
Rank 1
answered on 09 Oct 2014, 01:31 PM
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.
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Oct 2014, 03:22 PM
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.

 
0
Marc
Top achievements
Rank 1
Veteran
answered on 04 Sep 2018, 11:40 AM

Is that possible now?

 

[quote]Richard Slade said: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[/quote]

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 05 Sep 2018, 09:57 AM
Hello, Marc,         

The ScreenPosition property controls the position of the alert pop up on the working area of the active screen. Feel free to set this property to the desired value considering the location of your form. You can also refer to the sample code snippet from 06-Oct-2014 where it is demonstrated how you can manipulate the precise location of the popup. 

I hope this information helps. If you have any additional questions, please let me know.  
 
Regards,
Dess
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Marc
Top achievements
Rank 1
Veteran
answered on 05 Sep 2018, 11:31 AM

Now the DestkopAlert was shown at the right buttom corner.

What I need, is the size the DA will be.

FixedSize is set to empty and AutoSize to true.

I don't want to give a fixed size.

Look at the picture, you can see what I have and what I want.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 06 Sep 2018, 06:58 AM
Hello, Marc,          

According to the provided screenshots I have noticed that the size of RadDesktopAlert is identical but the location is different. If I understand your requirement correctly you need to position the alert at the bottom right corner of the form, not the monitor. Following the previously referred code snippet I have achieved the illustrated behavior from the gif file. Here is the code snippet: 

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)
    {
        x = this.Location.X + this.Width - popup.Size.Width;
        y = this.Location.Y + this.Height - popup.Size.Height;
        popup.Location = new Point(x, y);
    }
}

I have also attached my sample project for your refeence. If it is not the expected behavior, it would be greatly appreciated if you can provide additional information about the exact goal that you are trying to achieve. Thus, we would be able to assist you further.

If you need any further assistance please don't hesitate to contact me.

Regards,
Dess
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Marc
Top achievements
Rank 1
Veteran
answered on 06 Sep 2018, 07:21 AM

Hi Dess,

your gif doesn't show a DesktopAlert ;)
But I've found my mistake.

After deleting this row it works fine:
DesktopAlert:ScreenPosition                         = AlertScreenPosition:Manual.

 

Thank you :)

Tags
DesktopAlert
Asked by
Harsh Dara
Top achievements
Rank 1
Answers by
Vassil Petev
Telerik team
Harsh Dara
Top achievements
Rank 1
Nikolay
Telerik team
Richard Slade
Top achievements
Rank 2
Mike
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Marc
Top achievements
Rank 1
Veteran
Share this question
or