|
-
Mar 14th, 2007, 08:02 AM
#1
Thread Starter
Lively Member
List Control: ToolTip per row
In vb.net:
List Control: ToolTip per row. Is this possible?
I know you can do it per column but can this be done for each row to display a value from the row?
-
Mar 14th, 2007, 08:06 AM
#2
Re: List Control: ToolTip per row
How to you decide the Toolstrip Contents ?
Please mark you thread resolved using the Thread Tools as shown
-
Mar 14th, 2007, 08:08 AM
#3
Thread Starter
Lively Member
Re: List Control: ToolTip per row
tooltip content will be different for each row.
On load need to set this when loading rows in!
and then display when u hover over!
-
Mar 14th, 2007, 08:38 AM
#4
Re: List Control: ToolTip per row
vb Code:
'Add a Toolstrip in the form
'Add one Listbox
Class MyItem
Inherits ListBox
Public MyShowText As String
Public MyIntg As Integer
Public MyStrng As String
Sub New(ByVal ShowText As String, ByVal Intg As Integer, ByVal Strng As String)
MyBase.New()
'transfer all incoming parameters to your local storage
MyShowText = ShowText
MyIntg = Intg
MyStrng = Strng
'and finally, pass back the Text property
Me.Text = MyShowText
End Sub
End Class
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
ListBox1.DisplayMember = "Text"
ListBox1.Items.Add(New MyItem("ONE", 1, "o_n_e"))
ListBox1.Items.Add(New MyItem("Two", 2, "Two"))
ListBox1.Items.Add(New MyItem("Three", 3, "Three"))
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Dim myitem1 As MyItem
myitem1 = CType(ListBox1.SelectedItem, MyItem)
ToolTip1.SetToolTip(ListBox1, myitem1.MyStrng)
End Sub
Please mark you thread resolved using the Thread Tools as shown
-
Mar 14th, 2007, 11:15 AM
#5
Thread Starter
Lively Member
Re: List Control: ToolTip per row
Thanks man going to check it out
Brill man thx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|