Brad-
03-22-2006, 02:40 PM
Quick overview:
I am trying to improve our library access system, and one of the features I would like to do is to be able to have book info displayed on a mouseover event. So, they will mouseover the title, and I want it to pop up info, and disappear on mouseout.
This is using VB.NET, I've got my interface down, but I need some guidance with this feature.
Does anyone have any code examples or can point me in the right direction? (didnt find what I needed in this forum's search)
JNewt
03-22-2006, 05:21 PM
I think you'll need to give us some idea of how the interface is set up. Are the book titles being displayed in a listbox, etc.
cosmosis
03-22-2006, 05:58 PM
Quick overview:
I am trying to improve our library access system, and one of the features I would like to do is to be able to have book info displayed on a mouseover event. So, they will mouseover the title, and I want it to pop up info, and disappear on mouseout.
This is using VB.NET, I've got my interface down, but I need some guidance with this feature.
Does anyone have any code examples or can point me in the right direction? (didnt find what I needed in this forum's search)
what you're looking for is a tooltip
Dim myToolTips As New ToolTip
Private Sub Button7_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button7.MouseEnter
myToolTips.SetToolTip(Button7, "this button is nice")
End Sub
Private Sub Button7_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button7.MouseLeave
myToolTips.RemoveAll()
End Sub
Brad-
03-22-2006, 09:13 PM
Right now I've got them in a list box. I think I'm going to have them in a datagrid in the end though.
The tooltip rocks. Thanks!
gnappi
03-30-2006, 05:22 PM
what you're looking for is a tooltip
Dim myToolTips As New ToolTip
Private Sub Button7_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button7.MouseEnter
myToolTips.SetToolTip(Button7, "this button is nice")
End Sub
Private Sub Button7_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button7.MouseLeave
myToolTips.RemoveAll()
End Sub
Cool tip, one question?
If you use very many of these tips, it will make your main code pretty L-O-N-G. How can these be moved to another module?
Thanks,
Gary
JNewt
03-30-2006, 07:54 PM
Actually, you can drag and drop the Tooltip control from the toolbox to your form. Then go to each control you want the tooltip to display info for --you'll see a property called "Tooltip on Tooltip1" or something: enter the text you want to appear for that control. This method requires no code.