Results 1 to 40 of 1650

Thread: VBFlexGrid Control (Replacement of the MSFlexGrid control)

Threaded View

  1. #11

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Update released.

    Included the EditDropDownList run-time property to enrich the in-cell editing functionality.

    The EditDropDownList may be set at the BeforeEdit event, either to vbNullstring (default; off) or to a string each item separated by pipe characters. ("|")
    It works similar to the ComboList Property of the vsFlexGrid.
    However, I don't use the ComboBox class. I rely on the edit window and extended the combo functionality as can be seen at following screen:
    Name:  FlexEditDropDownList.png
Views: 1704
Size:  10.7 KB

    So everything works as normal with just some additional windows. The dropdown button is a Static control with SS_OWNERDRAW and SS_NOTIFY which can't get focus. So the edit window will not get destroyed by a lost focus.
    The actual dropdown window is a ComboLBox class window with WS_POPUP style. It also don't receive focus and can't be activated, it just "captures" the mouse and key inputs.

    Depending on how the EditDropDownList property is set it imitates a "Dropdown Combo" or "Dropdown List" style ComboBox.
    "Dropdown List": (Edit window with ES_READONLY; DroppedDown immediately)
    Code:
    EditDropDownList = "ListItem 1|ListItem 2"
    "Dropdown Combo": (Edit window unchanged; certain behavior adjustments)
    Code:
    EditDropDownList = "|ListItem 1|ListItem 2"
    The additional EditDroppedDown run-time property can programmatically expand or collapse the dropdown list by code. In normal cases not needed.
    Last edited by Krool; May 13th, 2019 at 05:15 PM.

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