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
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

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.
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

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
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