Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Given a .net control, can I get the tooltip?

Tags:

c#

.net

winforms

I have a .net control (ok, a lot of them). I can invoke methods on any given control, but cannot create new controls or access static methods of the classes I don't have controls for. I don't have access to any tooltip objects. Is there any way I can get the tooltip object for a given control?

(We're using a rather restricted test automation framework in Java to access controls on an application written in C#.net, is the background behind this odd query)

ETA: Maybe I didn't make myself clear. I'm not trying to set a tooltip, I'm trying to get the existing tooltip. And I can't create new controls so anything that includes new Foo() isn't going to work.

like image 582
Yamikuronue Avatar asked Apr 19 '12 19:04

Yamikuronue


1 Answers

string text = toolTip1.GetToolTip(yourControl);

This gives you the text on the tooltip for yourControl.

like image 83
meetjaydeep Avatar answered Sep 20 '22 14:09

meetjaydeep