Disable selected items in listbox component

Hello Friends,
I have a project about video library. In this movie videos’s names lited in listbox and catagorywise. I need to make a function to create if the movie is purchased, the video name should be enable, else disable in the listbox. Please give me solution for it.

your friend
Himanshu vyas