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
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
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
Is it possible to use a ScreenTip for a RadLabel?
Regards
Harsh
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
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
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
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.
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
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
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.
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.
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]
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.
Dess
Progress Telerik
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.
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
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 :)