RadDropDownList and ToolTipText

6 posts, 0 answers
  1. RSousa
    RSousa avatar
    7 posts
    Member since:
    Oct 2016

    Posted 23 Nov Link to this post

    Hi,

     

    Any reason for the ListElement of RadDropDownList showing the ToolTip when we have the RadDropDownList.ShowItemToolTips = False?

     

    Another thing how we can access to the RadDropDownList control from the ListElement control? Imagine we catch the MouseHover event from ListElement and want to access to the parent control (the RadDropDownList control)?

     

    Thank You

  2. Dimitar
    Admin
    Dimitar avatar
    1994 posts

    Posted 23 Nov Link to this post

    Hi Rodolfo,

    I was not able to reproduce the case where tooltips are shown. Could you please make sure that there is no other place where this is set to true. If not are you able to reproduce it in a blank new project?

    Here is how to get the drop-down list:
    private void RadDropDownList1_MouseEnter(object sender, EventArgs e)
    {
        var listElement = sender as RadListElement;
        var dropDown = listElement.ElementTree.Control as DropDownPopupForm;
        var ddl = dropDown.OwnerDropDownListElement;
    }

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. RSousa
    RSousa avatar
    7 posts
    Member since:
    Oct 2016

    Posted 23 Nov in reply to Dimitar Link to this post

    OK... I think was my problem.

    Thank you for how to find the DropDown control.

    Is any reason the MouseHover event of the ListElement of the DropDown Control only fire when I'm not above any of the List Items?
    Because the MouseLeave fires when I'm out of the ListElement area...
    Please check the attached picture.



  4. Dimitar
    Admin
    Dimitar avatar
    1994 posts

    Posted 27 Nov Link to this post

    Hi Rodolfo,

    This is the expected behavior and the event will fire for the innermost elements. What do you want to achieve in this case? Perhaps there is a better event for this.

    I am looking forward to your reply.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. RSousa
    RSousa avatar
    7 posts
    Member since:
    Oct 2016

    Posted 27 Nov in reply to Dimitar Link to this post

    Dear Dimitar,

    What I'm doing is to save on the TooltipText field of the controls the text/html I want to show as hint/help on a Statusbar.

    So, when the user moves the mouse above the many controls on the form, he can see on the statusbar a hint/help of what is needed to do.

    With the DropDownList I need to add this hint text in the DropDown and in the ListElement controls... but the mousehover events have this behavior for the ListElement.... can we add mousehover/mouseleave events on the ListItems and get the TooltipText from the ListElement parent?

     

    RS

  6. Dimitar
    Admin
    Dimitar avatar
    1994 posts

    Posted 28 Nov Link to this post

    Hello Rodolfo,

    I think that it would be better to use the MouseMove event. Here is how you can get the hovered item:
    public RadForm1()
    {
        InitializeComponent();
     
        radDropDownList1.Popup.MouseMove += Popup_MouseMove;
    }
     
    private void Popup_MouseMove(object sender, MouseEventArgs e)
    {
        var element = radDropDownList1.ListElement.ElementTree.GetElementAtPoint(e.Location) as RadListVisualItem;
        if (element != null)
        {
            Console.WriteLine(element.Text);
        }
    }

    Should you have any other questions do not hesitate to ask.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top