Well I think there is no other ways of doing it so I stick with this code but I have another question. How can I know if the item is checked by mouse or through the code? Thanks for any replies!