Click event

5 posts, 1 answers
  1. Jason Parrish
    Jason Parrish avatar
    87 posts
    Member since:
    Sep 2009

    Posted 25 Oct 2011 Link to this post

    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.
  2. Answer
    Jason Parrish
    Jason Parrish avatar
    87 posts
    Member since:
    Sep 2009

    Posted 25 Oct 2011 Link to this post

    AddHandler oalert.Popup.Click, AddressOf popup_clicked
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Marek Kruk
    Marek Kruk avatar
    16 posts
    Member since:
    Mar 2009

    Posted 18 Dec 2012 Link to this post

    Hi,
    I have an additional question. How to capture only popup click, not close button click and other buttons click?

    Thanks
    m.
  5. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 21 Dec 2012 Link to this post

    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.
  6. Marek Kruk
    Marek Kruk avatar
    16 posts
    Member since:
    Mar 2009

    Posted 21 Dec 2012 Link to this post

    Thanks a lot :)
Back to Top
UI for WinForms is Visual Studio 2017 Ready