Listbox And Textbox
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.
3 posts
Page 1 of 1
hello people 
Sorry to bother u all again however i need another help (yet again)
how do you make a listbox so that when you click on the selected index, the text will be loaded? and when you click on another index, another index,another text will be shown??
oh and also how can i read the textfile from a .txt? For example
----
Bears
------
Birds
I Click On Birds
All THe Information will be shown about bird, However i wanna to read the information through a txt file..? how is that possible??

Sorry to bother u all again however i need another help (yet again)
how do you make a listbox so that when you click on the selected index, the text will be loaded? and when you click on another index, another index,another text will be shown??
oh and also how can i read the textfile from a .txt? For example
----
Bears
------
Birds
I Click On Birds
All THe Information will be shown about bird, However i wanna to read the information through a txt file..? how is that possible??
This should work:
Code: Select all
When you say read through do you mean read each line? You can use IO.File.ReadAllLines for that. Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
TextBox1.Text = ListBox1.Text
End Sub
im sorry but i know all of those however, how am i suppose to read it and save it with Commas for example
Bear
--------
Bird
--------
I Click On Bird, it reads from a textfile
and the textfile will be like
Birds Are Under Bird Category ,Bears Are Under Mammals Category
The Text will show "Birds Are Under Bird Category"
And The Listbox Reads From The Textfile too so it will be like
Birds,Bears
Bear
--------
Bird
--------
I Click On Bird, it reads from a textfile
and the textfile will be like
Birds Are Under Bird Category ,Bears Are Under Mammals Category
The Text will show "Birds Are Under Bird Category"
And The Listbox Reads From The Textfile too so it will be like
Birds,Bears
3 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023