Ask Your Question
2

Is it possible to conceal the value column within a listbox using vb.net?

asked 2023-07-01 17:46:50 +0000

ladyg gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-07-01 17:56:01 +0000

nofretete gravatar image

Yes, it is possible to conceal the value column within a listbox using vb.net. One way to achieve this is by setting the DisplayMember property of the listbox to the property of the object that you want to display (e.g. the name of an object) and the ValueMember property to the property of the object that you want to retrieve (e.g. the ID of an object). Then, you can retrieve the value of the selected item by accessing the SelectedValue property of the listbox, which will return the value of the ValueMember property of the selected item. This way, the user will see the display member property (e.g. the name of an object) while the value member property (e.g. the ID of an object) will be hidden from view.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-01 17:46:50 +0000

Seen: 11 times

Last updated: Jul 01 '23