| View previous topic :: View next topic |
| Author |
Message |
I'm C.H. Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Dec 2006 Posts: 1000 Location: Sweden
|
Posted: Sun Jan 18, 2009 10:39 am Post subject: [Vb.net] ToolTips |
|
|
Well, I already know how to make tooltips appear on buttons, textboxes etc... but I need to know how to make them appear on ToolStripStatusLabel1. If I try doing:
| Code: | ToolTip1.SetToolTip(ToolStripStatusLabel1.Text, "blahblahblahb etc.....")
|
It says:
| Quote: | | Value of type 'String' cannot be converted to 'System.Windows.Forms.Control'. |
Since the ToolStripStatusLabel's source lies in System.Windows.Forms.ToolStripStatusLabel, Maby you can change the source? If not, how can I make it work?
_________________
Last edited by I'm C.H. on Sun Jan 18, 2009 12:03 pm; edited 2 times in total |
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Sun Jan 18, 2009 11:14 am Post subject: |
|
|
| Code: | Public Sub SetToolTip ( _
control As Control, _
caption As String _
) |
ToolStripStatusLabel1 is what?
The first parameter is which control will activate this ToolTip, so instead it would be:
ToolTip1.SetToolTip(Button1, "This text pops up on button1...");
And Button1 is just a name, use it for whatever control name you are using.
_________________
|
|
| Back to top |
|
 |
I'm C.H. Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Dec 2006 Posts: 1000 Location: Sweden
|
Posted: Sun Jan 18, 2009 11:50 am Post subject: |
|
|
Okay, so I have it like this:
| Code: | Private Sub VarLabel_MouseMove(ByVal sender As Object, ByVal e As System.EventArgs) Handles VarLabel.MouseMove
ToolTip1.SetToolTip(VarLabel, "Variable")
End Sub | but I still get the same error message. It doesn't get the VarLabel.
EDIT: One thing I didn't notice before was ToolTip on ToolTip1 at properties. It works fine on all other controls exept the Toolstrip one. It doesn't show there.
_________________
|
|
| Back to top |
|
 |
|