|
-
Aug 8th, 2019, 10:29 AM
#1
Fanatic Member
Re: CommonControls (Replacement of the MS common controls)
 Originally Posted by wqweto
JFYI, variable sized owner-drawn combo boxes are completely useless as there is this bug since Windows 9x that the drop-down list animates the scrolling in *opposite* direction which is really confusing for end-user and everyone.
Just use fixed height owner-drawn lists and prevent mouse down reaching original wndproc on disabled items. For keyboard selected ones I usually spoof the ListIndex property (or Value) to return -1 (or Empty) or something along these lines.
cheers,
</wqw>
Good to know. Thank you.
-
Aug 8th, 2019, 11:45 AM
#2
Re: CommonControls (Replacement of the MS common controls)
 Originally Posted by AAraya
Good to know. Thank you.
Btw, just tested it. This bug seems to be fixed in Windows 10 so one can safely use CBS_OWNERDRAWVARIABLE nowadays it appears.
My bad!
</wqw>
-
Aug 8th, 2019, 02:00 PM
#3
Re: CommonControls (Replacement of the MS common controls)
 Originally Posted by Hosam AL Dein
No , no disabled info at all , I even tested it in comctlsdemo project .
you can reproduce the issue by setting the listview forecolor to any color say "red" and run the demo form for virtualised controls and the color is black .
I can't reproduce your problem. I think you do something wrong.
In the GetVirtualItem event please make following:
Code:
If VirtualProperty = LvwVirtualPropertyForeColor Then Value = vbRed
In my testings this works. Please check again.
 Originally Posted by AAraya
Now I'd like to make a small visual tweak. I'd like the separator bar item to be half the height of a normal combo item.
I changed from Fixed to Variable Owner Drawn and am handling the ItemMeasure event. I leave all of the item's ItemHeight values as default except for the separator bar. I leave ItemDraw event code exactly as it was when in Fixed mode. This works properly for sizing the individual items but there's a problem - the combo dropdown list is not the correct size - rather than being large enough to show all of the items in the list it's only as large as one of the items. Is this a bug or am I supposed to be handling this somewhere?
The ItemMeasure event seems to be only for the combo items. Do I need to add some code to ItemDraw in Variable mode which I don't need in Fixed mode?
Appreciate any guidance you can provide.
It should work. I did a quick test and there was definitely more than 1 item in the list.
What's the setting of the MaxDropDownItems property?
Can you provide a demo project showing your issue? It would be good to know if there is maybe indeed a bug.
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
|