如何制作自定义控件来更改列表框项目的颜色?
问题描述:
我正在制作一个电影和娱乐系统,允许用户选择电影.我要做的是制作一个自定义列表框控件,该控件显示电影列表,并且当用户选择电影时,列表框中的项目会更改颜色.现在,我知道如何制作自定义控件,但是我不知道更改控件的颜色部分需要什么代码?
Hi, I''m making a film and entertainment system which allows users to select films. What I want to do is make a custom listbox control which displays a list of films and when the user selects a film, the item in the listbox changes colour. Now I know how to make custom controls, but I don''t know what code is needed for the changing colour part of the control?