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)

    bincong,

    instead of doing .RowHidden(1) = False there is a more elegant solution. (where you see the focus rect when control has focus)
    But this works only when you have more than 1 column in the scrollable area. Because then SelChange event is fired. When you have 1 column then .ColSel is always same as .Col and SelChange will not fire in this case.

    Code:
    With VBFlexGrid1
        .SelectRange 1, 1, 1, 1 ' .RowHidden(1) = False
        .SelectionMode = FlexSelectionModeByRow
        .AllowSelection = False
        .AllowMultiSelection = False
    End With
    This works now because due to latest release .AllowSelection and .AllowMultiSelection will not enforce selection according to selection mode anymore. So that the previous .SelectRange 1, 1, 1, 1 stays intact.
    Last edited by Krool; Jun 6th, 2025 at 01:07 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