|
-
May 15th, 2002, 03:21 AM
#1
Thread Starter
Addicted Member
Graying a check box in a list box (One for the Guru's)
I'm writing an application which has a listbox full of items. The Style property in the ListBox is set to 1 - CheckBox.
I've written some sub classing code to stop the user unchecking the first item in the list box, but I also want to gray the check box of the first item so it looks disabled.
How do I gray a check box in a list box?
Thanks in advance
Last edited by VB6Coder; May 15th, 2002 at 05:53 AM.
-
May 15th, 2002, 11:46 AM
#2
Hyperactive Member
If you're subclassing it already then its a doddle. Simply intercept the paint message (I can't remember what it is offhand) and replace the paint routine with your own. You could even draw the whole listbox yourself
-
May 15th, 2002, 11:59 AM
#3
Thread Starter
Addicted Member
Have you got any example code on how I should draw a disabled check box?
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|