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

Click event

4 Answers 134 Views
DesktopAlert
This is a migrated thread and some comments may be shown as answers.
Jason Parrish
Top achievements
Rank 1
Jason Parrish asked on 25 Oct 2011, 03:58 PM
How can I give the user the ability to click on the popup alert and perform some action?  I do not see a CLICK event on the popup object.

4 Answers, 1 is accepted

Sort by
0
Accepted
Jason Parrish
Top achievements
Rank 1
answered on 25 Oct 2011, 08:45 PM
AddHandler oalert.Popup.Click, AddressOf popup_clicked
0
Marek Kruk
Top achievements
Rank 1
answered on 18 Dec 2012, 11:01 AM
Hi,
I have an additional question. How to capture only popup click, not close button click and other buttons click?

Thanks
m.
0
Stefan
Telerik team
answered on 21 Dec 2012, 09:09 AM
Hello Marek,

You can subscribe to the MouseDown event of the popup and check the type of the clicked element:
radDesktopAlert1.Popup.MouseDown += Popup_MouseDown;
.................
void Popup_MouseDown(object sender, MouseEventArgs e)
{
    DesktopAlertPopup popup = (DesktopAlertPopup)sender;
    if (!(popup.ElementTree.GetElementAtPoint(e.Location) is RadButtonElement))
    {
        Console.WriteLine("you did not click a button");
    }
}

I hope this helps.

Kind regards,
Stefan
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
0
Marek Kruk
Top achievements
Rank 1
answered on 21 Dec 2012, 10:35 AM
Thanks a lot :)
Tags
DesktopAlert
Asked by
Jason Parrish
Top achievements
Rank 1
Answers by
Jason Parrish
Top achievements
Rank 1
Marek Kruk
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or