Results 1 to 40 of 4215

Thread: CommonControls (Replacement of the MS common controls)

Hybrid View

  1. #1
    Fanatic Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    762

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by wqweto View Post
    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.

  2. #2
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    6,203

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by AAraya View Post
    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>

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,742

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Hosam AL Dein View Post
    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.

    Quote Originally Posted by AAraya View Post
    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
  •  



Click Here to Expand Forum to Full Width