Does anybody know how to disable a particular item in a listbox? I
know how to disable every single item but have a need to disable
certain items only to display them (greyed out) but not let the user
select them.
Any suggestions would be appreciated.
C
liam - 26 Jul 2004 09:37 GMT
I don't know how to grey out the entries but you can use
Me.ListBox1.SetSelected(0, False) (where 0 is the
position in the items collection) in the handler of the
ListBox1.SelectedIndexChanged event to ensure a user
cannot select a particular entry.
hope that helps,
>-----Original Message-----
>Does anybody know how to disable a particular item in a listbox? I
[quoted text clipped - 6 lines]
>C
>.
Claes Bergefall - 26 Jul 2004 10:07 GMT
Take a look here
http://groups.google.se/groups?ie=UTF-8&as_umsgid=%23tUL%23uQVEHA.2928@tk2msftng
p13.phx.gbl&lr=&hl=sv
/claes
> Does anybody know how to disable a particular item in a listbox? I
> know how to disable every single item but have a need to disable
[quoted text clipped - 4 lines]
>
> C
theoneandonlycc - 26 Jul 2004 22:12 GMT
Thanks both of you for your suggestions. Will try them both