Hi,
I'm using an old version of the Infragistics controls, 2005 i believe. And i'm trying to find a way to always have the tooltips display when hovering over appointments in the UltraDayView control. Currently, the tooltip only shows when the appointment can't display the entire information (Subject & Description) on-screen.
From all the post i've read on this forum, i dont think it's possible with the controls existing method and properties.
So reading this post: http://forums.infragistics.com/forums/t/17064.aspx
I thought i could at least cancel the Infragistics control tooltip using the BeforeAppointmentToolTipDisplayed event and then use the Windows Tooltip control. But this is where i get stuck, i'm not sure how to associate the appointment to the .Net Tooltip control.
The Tooltip.SetTooltip() method accepts only a Control parameter, but Infragistics.Win.UltraWinSchedule.Appointment is not a Control or a descendant of Control. So that wont work.
And if i wanted to use the Tooltip.Show() to manually show the tooltip, i'd have to be able to consume an event when my mouse hovers over an appointment on the UltraDayView control. But i couldn't find any MouseHover event for the Appointment, only for the entire UltraDayView control.
So, that said i'm not sure what to do next, any ideas ?
Thanks everyone
using Infragistics.Win;using Infragistics.Win.UltraWinSchedule;
private System.Windows.Forms.ToolTip tooltip = new System.Windows.Forms.ToolTip();
void dayView_BeforeAppointmentToolTipDisplayed(object sender, BeforeAppointmentToolTipDisplayedEventArgs e){ UltraDayView dayView = sender as UltraDayView; string text = string.Format( "{0}{1}{2}", e.Appointment.Subject, Environment.NewLine, e.Appointment.Description ); this.tooltip.SetToolTip( dayView, text ); e.Cancel = true;}
Thanks Brian, but that wont work all the time.
The BeforeAppointmentToolTipDisplayed event is only triggered when the tooltip is displayed. And the tooltip is only displayed when the information listed in the appointment box on the UltraDayView is not completly visible. If the infomration in that appointment box is totally visible, the tooltip does not show, and the event doesn't trigger.
I'd need something like a mouse enter or a mouse hover event on the appointment box element.
I noticed yesterday that the AppointmentUIElement has a OnMouseEnter event, could it be the way to get that event triggered? Even if it was, i wouldn't know where to start to expose that event on the appointment element
regards
Thanks,
I'll give that a shot
Sorry, we get a lot of posts and sometimes I scan through them too quickly; once I saw you mention the BeforeAppointmentToolTipDisplayed event I just went with that. The behavior has not changed since 5.3.You can handle the MouseEnterElement event to get a notification as soon as the cursor passes within a given element, like so:
using nsDayView = Infragistics.Win.UltraWinSchedule.DayView;
this.dayView.MouseEnterElement += new UIElementEventHandler(dayView_MouseEnterElement);
void dayView_MouseEnterElement(object sender, UIElementEventArgs e){ if ( e.Element is nsDayView.AppointmentUIElement ) { }}
Note that there is also a MouseLeaveElement event, which can be used to hide the tooltip.
I just wanted to mention again that we're using an older version of your library, 5.3.20053.73.
So the behavior might be different. Maybe a newer version would trigger the tooltip event all the time, even if the Appointment details in the box are all visible ?!?