This is a migrated thread and some comments may be shown as answers.
RadDropDownList and ToolTipText
5 Answers 22 Views
This is a migrated thread and some comments may be shown as answers.
RSousa
Top achievements
Rank 1
RSousa asked on 23 Nov 2017, 07:14 AM

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

5 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 23 Nov 2017, 08:54 AM
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.
0
RSousa
Top achievements
Rank 1
answered on 23 Nov 2017, 11:29 AM

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.



0
Dimitar
Telerik team
answered on 27 Nov 2017, 12:05 PM
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.
0
RSousa
Top achievements
Rank 1
answered on 27 Nov 2017, 01:44 PM

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

0
Dimitar
Telerik team
answered on 28 Nov 2017, 08:53 AM
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.
Asked by
RSousa
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
RSousa
Top achievements
Rank 1
Share this question
or