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

image tooltip?

3 Answers 293 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 13 Dec 2008, 05:27 PM
Hi..
Is there any way to use an image - picturebox as a tool tip?
thanks

3 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 16 Dec 2008, 03:23 PM
Hello Jon The Nerd,

Thank you for the question.

Our RadOffice2007ScreenTip supports displaying text and images and you can use it for the nodes of a RadTreeView. To do so, first subscribe to the ScreenTipNeeded event of the RadTreeView. Then, in the event handler set properties of the RadOffice2007ScreenTip:
RadOffice2007ScreenTipElement screenTip = new RadOffice2007ScreenTipElement();  
Size size = new Size(120, 50);  
Padding pad = new Padding(2);  
 
void radTreeView1_ScreenTipNeeded(object sender, ScreenTipNeededEventArgs e)  
{  
    TreeNodeUI node = e.Item as TreeNodeUI;  
    if (node != null)  
    {  
        screenTip.MainImage.Image = WindowsApplication6.Properties.Resources.gear;  
        screenTip.MainImage.Padding = pad;  
        screenTip.CaptionLabel.Padding = pad;  
        screenTip.CaptionLabel.Text = "Customers View";  
        screenTip.MainTextLabel.Text = node.Text;  
        screenTip.EnableCustomSize = true;  
        screenTip.AutoSize = false;  
        screenTip.Size = size;  
        node.ScreenTip = this.screenTip;  
    }  

I hope this helps. If you have additional questions, feel free to contact me.

Greetings,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
bla
Top achievements
Rank 1
Veteran
answered on 25 Feb 2021, 11:16 AM
screenTip.MainImage already does not exist at all! So how can anyone believe this would be a possible solution? Even your documentation does not Mention it at all. So is this completely fake or did you forget some secret extensions???
0
Nadya | Tech Support Engineer
Telerik team
answered on 25 Feb 2021, 12:50 PM

Hello,

The post that you are referring to is quite old back to 2008. We have introduced a lot of new features and improvements in our controls since then. Please refer to the actual documentation where you can find more information about RadOffice2007ScreenTipElementhttps://docs.telerik.com/devtools/winforms/telerik-presentation-framework/tooltips-and-screentips/screen-tips 

Below you can find a sample code snippet of how you can assign an image to RadOffice2007ScreenTipElement:

RadOffice2007ScreenTipElement screenTip = new RadOffice2007ScreenTipElement();
private void RadTreeView1_ScreenTipNeeded(object sender, ScreenTipNeededEventArgs e)
{
    TreeNodeElement node = e.Item as TreeNodeElement;
    if (node != null)
    {
        screenTip.MainTextLabel.Image = Resources.usa;
        screenTip.CaptionLabel.Text = "Customers View";
        screenTip.MainTextLabel.Text = node.Text;
        node.ScreenTip = this.screenTip;
    }
}

I hope this helps. Let me know if you have any other questions.

Regards,
Nadya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Treeview
Asked by
Jon
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
bla
Top achievements
Rank 1
Veteran
Nadya | Tech Support Engineer
Telerik team
Share this question
or