disable left mouse click

didgydont

Active member
Joined
Mar 2, 2009
Messages
37
Programming Experience
Beginner
hello all
is there a way to disbale a left mouse click in a listbox without disabling the list box ?
thank you
 
Not really with the standard ListBox as far as I'm aware. What exactly are you trying to achieve? Do you just want to display a list without the user being able to select an item?
 
yes i have 2 list boxes i want 1 of them to display only to force the user to use the first list box. i managed to get it not selectable but when they click first box second box needs to be able to select which makes the app crash
 
You can set the listbox's SelectMode property to None, but this would also disallow you being able to programmatically select any index in that listbox too.

It would still be easy enough to write coding that will search your second listbox and return the index you need to use without every actually selecting the item.
 
You can set the listbox's SelectMode property to None, but this would also disallow you being able to programmatically select any index in that listbox too.

It would still be easy enough to write coding that will search your second listbox and return the index you need to use without every actually selecting the item.

i tried this because it selects the second listbox when you change index on first listbox it crashes because second one cant be selected
 
Correct dont select anything from the second listbox, just search it with coding and extract the value from it that you need.
 
Back
Top