appt tool tip gets stuck

2 posts, 0 answers
  1. John
    John avatar
    60 posts
    Member since:
    Nov 2006

    Posted 10 Apr 2013 Link to this post

    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
  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 15 Apr 2013 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top