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? :eek:
Printable View
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? :eek:
How to you decide the Toolstrip Contents ?
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! :sick:
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
:thumb: :thumb: Thanks man going to check it out
Brill man thx