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

Calendar Cell ToolTip Behavior

3 Answers 118 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Ben B
Top achievements
Rank 1
Ben B asked on 30 Apr 2012, 07:01 PM
Dear Friends,

Is there a way to manage the tooltip behavior of the calendar?

When I use cell.ToolTipText ="Something" it look Ok, but,  with Long Text it's staying on one straight line!

I wish to be able to Word Wrap the long text so I don't see it all across the screen!

Thanks for any Infos!

Ben
 

3 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 01 May 2012, 03:16 PM
Hello Ben, 

You can control the size of the tooltip via the System.Windows.Forms.ToolTip and subscribing to the PopUp event
E.g. 

private ToolTip toolTip = null;
private string tip = "";

toolTip = this.radCalendar1.ElementTree.ComponentTreeHandler.Behavior.ToolTip;
toolTip.Popup += new PopupEventHandler(toolTip_Popup);
this.radCalendar1.ToolTipTextNeeded += new ToolTipTextNeededEventHandler(radCalendar1_ToolTipTextNeeded);

void toolTip_Popup(object sender, PopupEventArgs e)
{
   e.ToolTipSize = new Size(50, 300);
}
 
void radCalendar1_ToolTipTextNeeded(object sender, ToolTipTextNeededEventArgs e)
{
    tip = "This is quite a long tip and will be broken down into several lines when the user hovers over and has a look at the tip";
    e.ToolTipText = tip;
}

and you can control other ToolTip elements. E.g. 
toolTip = this.radCalendar1.ElementTree.ComponentTreeHandler.Behavior.ToolTip;
toolTip.BackColor = System.Drawing.Color.LightBlue;
toolTip.IsBalloon = true;

Hope that helps
Richard

0
Ben B
Top achievements
Rank 1
answered on 01 May 2012, 04:06 PM
Hi Richard!

Again, You Helped Me the First Shot!

Thanks, I Appreciate It!

Ben
0
Richard Slade
Top achievements
Rank 2
answered on 01 May 2012, 04:06 PM
Glad it helped, Ben! 
Richard
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Ben B
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Ben B
Top achievements
Rank 1
Share this question
or