Results 1 to 40 of 1650

Thread: VBFlexGrid Control (Replacement of the MSFlexGrid control)

Threaded View

  1. #11
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    238

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    Update released.

    Thanks to inspiration by softv I introduced now the ComboCue property.

    It needs to be set at run-time to either 0 - None, 1 - DropDown or 2 - Button.

    The demo project was updated to use this new functionality.

    Name:  FlexComboCue.png
Views: 1458
Size:  4.5 KB

    This is how it needs to be set. As you see below the ComboCue and the actual ComboMode for editing are independent of each other.
    So, it is the app responsobility to apply the correct ComboCue upon RowColChange event.

    Code:
    Private Sub VBFlexGrid1_RowColChange()
    ' The combo cue can only be displayed on the current cell.
    If VBFlexGrid1.Row >= VBFlexGrid1.FixedRows Then
        Select Case VBFlexGrid1.Col
            Case COL_CALENDARVALIDATION, COL_COMBODROPDOWN, COL_COMBOEDITABLE
                VBFlexGrid1.ComboCue = FlexComboCueDropDown
            Case COL_COMBOBUTTON
                VBFlexGrid1.ComboCue = FlexComboCueButton
            Case Else
                VBFlexGrid1.ComboCue = FlexComboCueNone
        End Select
    Else
        VBFlexGrid1.ComboCue = FlexComboCueNone
    End If
    End Sub
    The new hit result enum FlexHitResultComboCue helps to identify the graphical cue.

    However, it is not only a cue. It makes it also easier to start editing.
    When a cue is displayed and you click on it then the editing is started and the drop-down list will be shown.

    The new edit reason enums FlexEditReasonComboCueClick, FlexEditReasonComboCueDblClick and FlexEditReasonComboCueF4 helps for this.

    What's missing (for now):
    Like for ComboButtonValueDisabled maybe a disabled graphical cue might be helpful.
    For ComboCueDropDown the alt-down arrow key may also start editing. (enum FlexEditReasonComboCueAltKey ?)
    Hot-tracking for the graphical cue.
    Dear krool,

    Infinite Thanks to God. Infinite Thanks to you. The cue and the provision for easier editing are excellent! Absolutely Excellent!

    God is Great. Just yesterday only I was thinking of writing to you today, requesting for the ComboCalendar to pop down immediately on a single click, if at all possible. And, to my pleasant surprise, you have paved the way for the same already! Great, krool. Great. Through hot-tracking (which you have kept in your pipeline), I was able to just single click (much similar to combo boxes) and make the ComboCalendar to pop down. i.e. Hover -> See the Cue -> Click the Cue -> Pop Down. That's all.

    I just tried a similar code as the one you have given above, in the 'Mouse_Move event' (after MouseTrack = true) of the gird, just for a single Combo Cell, and I could make the ComboCue appear on mouse hover and thereafter the ComboCalendar to pop down with a single click on the ComboCue. Thanks in TONs again. Of course I would still await your ideal and professional approach to achieve the hot-tracking of ComboCue. As of now, I am just informing you that I experimented, found it working for a single Combo cell and my joy and gratitude knew no bounds. . For the time being, I will try to extend my logic to cover any Combo cell and use the same. Once you release your own perfect hot-tracking code, I would adopt the same, of course, obviously.

    And, until I extend my abovementioned logic, I will continue using my current code (as given below) for achieving the ComboCalendar to pop down (with a single click on the Cue area). I am having the following code in the 'CellClick' event of a grid (say flx1, whose .ColComboMode(1) = FlexComboModeCalendar). There must be a better way of course (than the following code) but the following code itself suits my requirements. You must be able to suggest a better way though.

    Code:
    If col = 1 Then
        flx1.StartEdit
        Call MouseClick 'simulates a single left click on the cell's ComboCue.
    End If
    Apart from 'mouse hover' ComboCue, personally, for my own requirements, I thought that perhaps having the ComboCue permanently on the topmost cell of a ComboColumn (i.e. in the top row alone) also would be helpful, from users' point of view. That is also possible for me to achieve now with your ComboCue property. . Thanks a TON again.

    May be a boolean property (say 'ComboCueInTopRow') to do the above automatically would be helpful too but this is just a very small and random thought.

    Well, once again thanking you, in TONS - not only for ComboCue, but for every bit of matchless goodness you have given to this world society through your free controls. God Bless you! God Bless all!

    Kind regards.
    Last edited by softv; Oct 29th, 2021 at 10:34 AM.

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