This is a migrated thread and some comments may be shown as answers.

appt tool tip gets stuck

1 Answer 46 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 10 Apr 2013, 08:54 PM
I have a scheduler i'm adding screen tips to in the AppointmentFormatting event.  i use the following code

var screenTip = new RadOffice2007ScreenTipElement();
                screenTip.MainTextLabel.Text = SchedulerRepository.GetAppointmentToolTip(ent);
                screenTip.CaptionLabel.Text = "";
                screenTip.BackColor = Color.White;
                screenTip.AutoSize = false;
                var sz = screenTip.Size;
                sz.Width = 400;
                sz.Height = 150;
 
                screenTip.Size = sz;
 
                apptEle.ScreenTip = screenTip;

when i double click an appt to edit it (not using the built in editor, my own) the tool tip doesn't go away.  it stays over the screen and messes up the edit.  is there a way to programmaticly close the tool tip?  I'm doing an e.Cancel in the 
AppointmentEditDialogShowing event and then showing the dialog i want with the 
AppointmentElementDoubleClick event.  it's not a modal window, but a user control i'm making visible overtop of the existing scheduler.
Thanks

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 15 Apr 2013, 12:39 PM
Hello John,

Thank you for writing.

I am not quite sure how exactly you are showing the screen tips in your case, however, the best way to do that is to use the ScreenTipNeeded event of the control. Here is an example:
RadOffice2007ScreenTipElement screenTip = new RadOffice2007ScreenTipElement();
 
void radScheduler1_ScreenTipNeeded(object sender, ScreenTipNeededEventArgs e)
{
    if (e.Item is AppointmentElement)
    {
        screenTip.MainTextLabel.Text = "main text";
        screenTip.CaptionLabel.Text = "";
        screenTip.BackColor = Color.White;
        screenTip.AutoSize = false;
        var sz = screenTip.Size;
        sz.Width = 400;
        sz.Height = 150;
        screenTip.Size = sz;
 
        e.Item.ScreenTip = screenTip;
    }
}

Using this approach, I could not replicate the experienced behavior. Please give it a try and let me know how this works for you. 

Regards,
Stefan
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Tags
Scheduler and Reminder
Asked by
John
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or