Combo boxes - owner draw

Posted by: mike on 8 May 2019, 3:07 pm EST

    • Post Options:
    • Link

    Posted 8 May 2019, 3:07 pm EST

    1. Is it possible to do owner draw for both the box itself and the dropdown in C1ComboBox?

    2. If the answer is no, how exactly do you do OwnerDraw in C1Combo? When I set the DrawMode to OwnerDrawFixed - the DrawItem event fires only for the combo box itself, not for any of the items in the dropdown. I tried adding a column and setting the DisplayColumn’s OwnerDraw property to true - still the same result.

  • Posted 8 May 2019, 3:13 pm EST

    Also - the OwnerDraw property in the DisplayColumn says if true it will fire an OwnerDrawCell event. C1Combo doesn’t have an OwnerDrawCell event.

  • Posted 10 May 2019, 6:47 am EST

    Hello,

    1. It is not possible as yet.
    2. C1Combo has OwnerDraw firing DrawItem Event. This happens when DrawMode is set to OwnerDrawFixed or OwnerDrawVariable.
    3. OwnerDrawCell event exists with respect to C1List:

      https://help.grapecity.com/componentone/NetHelp/c1list/webframe.html#C1.Win.C1List.4~C1.Win.C1List.ListBase.C1ListBase~OwnerDrawCell_EV.html

      As the API is same for all, you see the same description of OwnerDraw property for C1Combo as well.

    To be able to assist you in the correct manner, I request you to share your use-case. This will help me understand the issue and suggest a proper solution.

    Regards,

    Esha

  • Posted 10 May 2019, 7:58 am EST

    The use case - I would like to owner-draw both the contents of the C1Combo box itself (without the drop down) and the contents of each item in the drop down.

    Currently the DrawItem event does not fire for the contents of each item in the drop down.

  • Posted 13 May 2019, 6:34 am EST

    Hi,

    I have forwarded an enhancement request to the development team [Internal Tracking ID: 379245] for the same.

    If found feasible, the team shall add it in the API in the future builds. I will update you once I receive any information.

    Regards,

    Esha

  • Posted 28 August 2019, 1:36 am EST

    Hello,

    As per the team, it is not possible. The items can be drawn with DrawItem event only in the drop-down list, but not in the editor part.

    Thanks.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels