Using tooltips and listboxes
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
8 posts
Page 1 of 1
Hello,
I am using a listbox control, and I want the user to see the name of the song when the mouse is hovered over an item. In the listbox, it has the full directory for ease of playing the music on click event. Can somebody either tell me how to show the name of the song in a run-time-made tooltip or tell me how I could use the Listview to show the name and directory. Note with the listview I would need to know how to make Player.URL = Listview1.SelectedItem work.
Thanks.
~GoodGuy17
I am using a listbox control, and I want the user to see the name of the song when the mouse is hovered over an item. In the listbox, it has the full directory for ease of playing the music on click event. Can somebody either tell me how to show the name of the song in a run-time-made tooltip or tell me how I could use the Listview to show the name and directory. Note with the listview I would need to know how to make Player.URL = Listview1.SelectedItem work.
Thanks.
~GoodGuy17

i dont get what you mean. so i cant help you unless you explain.
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
I am using a listbox.
Everytime I click Add Song, I navigate to a song, and add it to the listbox.
I want to see the name of the song, instead of the file location, when I hover the mouse over the location. If you can't do that, I could use a ListView and put the name under a column.
Everytime I click Add Song, I navigate to a song, and add it to the listbox.
I want to see the name of the song, instead of the file location, when I hover the mouse over the location. If you can't do that, I could use a ListView and put the name under a column.
Ok, now for the part where u take the name, u could use : listbox.items.add(OpenFileDialog1.SafeFileNames)
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
No I need the name of the song. Like If I get C:\BLABLABLA\Song.wav I want Song.wav to show up in a tooltip.
Code: Select all
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
ToolTip1.RemoveAll()
ToolTip1.SetToolTip(ListBox1, Path.GetFileName(ListBox1.SelectedItem.ToString()))
End Sub
Thanks mandai.
Later in other help, can you tell people what to import because if someone was new to vb and you gave them a code like this they would come back saying it doesnt work since they didnt import System.IO
Later in other help, can you tell people what to import because if someone was new to vb and you gave them a code like this they would come back saying it doesnt work since they didnt import System.IO
8 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023