Page 32 of 33 FirstFirst ... 222930313233 LastLast
Results 1,241 to 1,280 of 1291

Thread: VBFlexGrid Control (Replacement of the MSFlexGrid control)

  1. #1241
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Exclamation Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    Delete respects now the ClipMode (= ExcludeHidden)
    Doesn't work for me.

    Code:
    Private Sub Command1_Click()
       With VBFlexGrid1
          .ClipPasteMode = FlexClipPasteModeNormal
          .Col = 1:    .Row = 1
          .ColSel = 3: .RowSel = 2
          .ColHidden(2) = True
          .Delete                  ' The hidden col(2) was cleaned too
    '      .Clear FlexClearClip, FlexClearText
          .ColHidden(2) = False
          .SetFocus
       End With
    End Sub

  2. #1242

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Nouyana View Post
    Doesn't work for me.

    Code:
    Private Sub Command1_Click()
       With VBFlexGrid1
          .ClipPasteMode = FlexClipPasteModeNormal
          .Col = 1:    .Row = 1
          .ColSel = 3: .RowSel = 2
          .ColHidden(2) = True
          .Delete                  ' The hidden col(2) was cleaned too
    '      .Clear FlexClearClip, FlexClearText
          .ColHidden(2) = False
          .SetFocus
       End With
    End Sub
    Delete "respects" the ClipMode property. By that you need to set it of course to ExcludeHidden.
    Add below code and it suddenly works.
    Code:
    .ClipMode = FlexClipModeExcludeHidden

  3. #1243
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Thumbs up Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    By that you need to set it of course to ExcludeHidden.

  4. #1244

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Included enum FlexDirectionAfterReturnEdit/FlexEditReasonReturn.
    By this the edit mode is initiated by the return key, but only when shift state is 0.
    It is intentionality included in the DirectionAfterReturn property to not change default behavior and it's logical because you can either move the cursor or start edit mode, but not both.

    The OCX VBFLXGRD17 was also updated. The internal type lib version is now 1.5.

    Code:
    Object={2DA70529-3366-414A-B408-46083BCD481B}#1.5#0; VBFLXGRD17.OCX

  5. #1245
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Question Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Krool, did you notice my message?

  6. #1246

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Nouyana View Post
    A bug?

    Code:
    Private Sub Command1_Click()
       With VBFlexGrid1
          .Align = vbAlignTop       ' If Align = vbAlignTop
          Set .Container = Picture1 ' and the Container is set to a PictureBox
          .ScrollBars = vbVertical  ' then I can't see any scrollbars.
       End With
    End Sub
    Do you adjust the width/height of the VBFlexGrid so it fits into the PictureBox?

  7. #1247
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    Do you adjust the width/height of the VBFlexGrid so it fits into the PictureBox?
    I use the Align = vbAlignTop only. It adjusts the width. Nothing more.

  8. #1248

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Nouyana View Post
    I use the Align = vbAlignTop only. It adjusts the width. Nothing more.
    Well, the code makes no sense. Because first of all the Align property works only when placed on a Form. Not in a PictureBox.
    And you set the Align "prior" to changing the container. So the FlexGrid Width is then qual to the Form Width. Is that intended by you?
    If your PictureBox width is now "smaller" then guess what, you don't "see" the scrollbars.

  9. #1249
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    Align property works only when placed on a Form.
    I didn't know it. Can you fix it?

  10. #1250

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Nouyana View Post
    I didn't know it. Can you fix it?
    No I can't. Align is a vb6 property.

  11. #1251
    New Member
    Join Date
    Oct 2023
    Posts
    9

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Hello Mr. Krool,
    I need your help.
    I get the following error: ERROR VBCCR17 Run-time error '50003'; Unexpected error.

    I have a form where I am using imagelist as an image container for a menu bar,
    the icons are 16x16 pixels, generated from .svg files (with old traditional .ico no problem),
    In Windows 10 I do not have any problem,
    the problem occurs in some versions of windows 7 service pack 1,
    I have tried it on a vm with windows 7 sp1 and it has not given me any problems.
    What library do you use to load the images that may be outdated in these Windows.

  12. #1252
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by vb6nostalgia View Post
    Hello Mr. Krool,
    I need your help.
    I get the following error: ERROR VBCCR17 Run-time error '50003'; Unexpected error.

    I have a form where I am using imagelist as an image container for a menu bar...
    You should repost it here.


  13. #1253

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by TheLeePiper View Post
    Thanks so much. I looked at the vsFlexGrid API calls. For reference, the DataTable API looks like:

    Datatbl1.CellSet(0,0).BorderColor = RGB(255, 0, 0)
    Datatbl1.CellSet(0,0).BorderWidth = 1

    CellSet can point to any arbitrary cell, CurCell to the cell with focus. Any cell where the BorderWidth is zero (the default) does not show a border. Not quite sure how this might map to the VBFlexGrid.

    Borders are inside the grid, which of course, would affect ComboButton sizing (which it does with the DataTable). Just ignorantly free-thinking here, could it be a variant of the FlexCellBackColor usage? Instead of coloring the whole cell BG, it could be just an inset width? Set the right-side inset from any ComboButton so you would not need to modify the buttons? (Not quite the same as the DataTable, but would be very suitable for our needs.) Thanks again.
    I am still struggling of "best way".
    How about a CellGridLines property which overwrites the general grid lines?

  14. #1254
    New Member
    Join Date
    Oct 2023
    Posts
    9

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Nouyana View Post
    You should repost it here.

    Thank you. I was in the wrong place.

  15. #1255
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Question Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    solved
    Last edited by Nouyana; Feb 12th, 2024 at 12:27 PM.

  16. #1256
    New Member
    Join Date
    Dec 2020
    Posts
    14

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    I am still struggling of "best way".
    How about a CellGridLines property which overwrites the general grid lines?
    That absolutely could work. Would this cell border thickness need to be the same as the default GridLineWidth?

    Just for reference, we use cell BG colors for navigation control (i.e, to determine a tab stop for editing). For a new theme, we want to have white grid BG and grid line with "tab stop" cells that are slightly-off-white and a dark cell border for the visual indicator of these cells. (In other themes, the grid BGs are non-white and cell BGs are sufficiently different, so no border is needed. But we may add the border to these anyway for additional distinction.)

    Thanks!

  17. #1257
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    solved
    Last edited by Nouyana; Feb 12th, 2024 at 12:27 PM.

  18. #1258

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by TheLeePiper View Post
    That absolutely could work. Would this cell border thickness need to be the same as the default GridLineWidth?

    Just for reference, we use cell BG colors for navigation control (i.e, to determine a tab stop for editing). For a new theme, we want to have white grid BG and grid line with "tab stop" cells that are slightly-off-white and a dark cell border for the visual indicator of these cells. (In other themes, the grid BGs are non-white and cell BGs are sufficiently different, so no border is needed. But we may add the border to these anyway for additional distinction.)

    Thanks!
    On second thought. The gridline is drawn "between" cells. So 1 physical cell does not draw the entire gridline for itself. Only half, the other half is drawn by the left and top neighbor cell.
    So, I guess your request does not really "fit" for VBFlexGrid and I am afraid to reject your request until a good idea approaches.

    I checked with the vsFlexGrid and the CellBorder function is not respected by anything. (focus rect, combo button etc.) so it's just a "rectangle drawn over".

  19. #1259
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Lightbulb Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    solved
    Last edited by Nouyana; Feb 12th, 2024 at 12:17 PM.

  20. #1260
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Question Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    Included the ColWordWrapOption/ColWordWrapOptionFixed run-time property.
    This was an over-due feature missing from the MSHFlexGrid.
    Now it is possible to overwrite per column from the default text formatting of the general WordWrap and SingleLine property.
    Ok. Only two questions left. What is the difference between:
    1. FlexWordBreakEndEllipsis and FlexWordBreakWordEllipsis.
    2. FlexSingleLineEndEllipsis and FlexSingleLineWordEllipsis

    Name:  ColWordWrapOption.png
Views: 283
Size:  33.1 KB

  21. #1261

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Nouyana View Post
    Ok. Only two questions left. What is the difference between:
    1. FlexWordBreakEndEllipsis and FlexWordBreakWordEllipsis.
    2. FlexSingleLineEndEllipsis and FlexSingleLineWordEllipsis

    Name:  ColWordWrapOption.png
Views: 283
Size:  33.1 KB
    The difference is that the one use DT_END_ELLIPSIS and the other DT_WORD_ELLIPSIS in the DrawText API.

  22. #1262
    New Member
    Join Date
    Dec 2020
    Posts
    14

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    On second thought. The gridline is drawn "between" cells. So 1 physical cell does not draw the entire gridline for itself. Only half, the other half is drawn by the left and top neighbor cell.
    So, I guess your request does not really "fit" for VBFlexGrid and I am afraid to reject your request until a good idea approaches.

    I checked with the vsFlexGrid and the CellBorder function is not respected by anything. (focus rect, combo button etc.) so it's just a "rectangle drawn over".
    Understood. I hope you won't mind me tossing ideas from time-to-time to see if it resonates...

    One thought given the order of things was to consider this in a manner similar to the FlexComboCue*. I haven't dug into your code, but I assume that you are rendering the DropDown and Button images after the grids and cell BGs are established. Could this be something like a FlexCellCueBorder, where at the same time of rendering the Combo images a border could be drawn around the grid using a defined GridColorAlt?

  23. #1263
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    Nouyana,

    thanks however for bringing this up. It seems there is a bug.
    If ComboItems is "" then a "blank" item is inserted.

    So I will change the behavior in next release that if ComboItems is vbNullString (StrPtr() = 0) then really no item is inserted. However, if ComboItems is "" then a "blank" item shall still be inserted.
    Is it still in your roadmap?

  24. #1264

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Nouyana View Post
    Is it still in your roadmap?
    That's already implemented.

  25. #1265
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Question Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    That's already implemented.
    Yes, I can see now that ComboListCount = 0 when ComboItems is set to vbNullString. But what I noticed is an "empty" drop-down list which is still there, unlike the standard controls. Is it by design?

    Code:
    Private Sub VBFlexGrid1_ComboDropDown()
       With VBFlexGrid1
          Debug.Print .ComboListCount    ' Returns 0.
       End With
    End Sub
    
    Private Sub Command1_Click()
       With VBFlexGrid1
          .CellComboCue = FlexComboCueDropDown
          .ComboMode = FlexComboModeDropDown
    '      .ComboItems = vbNullString    ' I can see an "empty" drop-down list
       End With
       With cmbCombo1     ' VB ComboBox
          .AddItem "Item"
          .RemoveItem 0                  ' There is no drop-down list.
       End With
       With cmbComboBoxW1 ' CCR ComboBox
          .AddItem "Item"
          .RemoveItem 0                  ' There is no drop-down list.
       End With
    End Sub
    Last edited by Nouyana; Feb 16th, 2024 at 05:34 AM.

  26. #1266
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Lightbulb Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    20-Oct-2023
    - Included enum FlexAlignmentGeneralTop/FlexAlignmentGeneralCenter/FlexAlignmentGeneralBottom.
    The enum FlexAlignmentGeneral keeps valid and is the default column alignment value.
    Am I understand right that there is no any difference between the FlexAlignmentGeneralCenter and FlexAlignmentGeneral constants?

    And, by the way, Krool, may be you didn't know it because it's a bit undocumented. So, just as advice.

    Code:
    Private Enum MyEnum
       [_enmFirst] = -1 ' You may keep the (-1) value here.
                        ' This is just an invisible constant.
       enm1 = 0
       enm2 = 1
       enm3 = 2         ' You may easy add a new constant here, but
       [_enmLast] = 2   ' don't forget to update the last (invisible) constant.
    End Enum
    
    Public Property Let MyProperty(ByVal Value As MyEnum)
       Select Case Value
       Case [_enmFirst] To [_enmLast] ' You may use it instead of full enumeration.
       Case Else
          Err.Raise Number:=30005, Description:="Invalid Alignment value"
       End Select
    End Property

  27. #1267

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Nouyana View Post
    Yes, I can see now that ComboListCount = 0 when ComboItems is set to vbNullString. But what I noticed is an "empty" drop-down list which is still there, unlike the standard controls. Is it by design?

    Code:
    Private Sub VBFlexGrid1_ComboDropDown()
       With VBFlexGrid1
          Debug.Print .ComboListCount    ' Returns 0.
       End With
    End Sub
    
    Private Sub Command1_Click()
       With VBFlexGrid1
          .CellComboCue = FlexComboCueDropDown
          .ComboMode = FlexComboModeDropDown
    '      .ComboItems = vbNullString    ' I can see an "empty" drop-down list
       End With
       With cmbCombo1     ' VB ComboBox
          .AddItem "Item"
          .RemoveItem 0                  ' There is no drop-down list.
       End With
       With cmbComboBoxW1 ' CCR ComboBox
          .AddItem "Item"
          .RemoveItem 0                  ' There is no drop-down list.
       End With
    End Sub
    I don't understand. In all cases the drop-down list has no items. What's exactly the issue ?
    What you mean by "no drop-down list" ? Of course there is a list shown when you push the dropdown button. Also in VB ComboBox.

  28. #1268
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Arrow Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    Of course there is a list shown when you push the dropdown button. Also in VB ComboBox.
    Only in the VBCCR ComboBox

    Code:
    Private Sub cmdAddItems_Click()
       With VBFlexGrid1
          .CellComboCue = FlexComboCueDropDown
          .ComboMode = FlexComboModeDropDown
          .ComboItems = "Arnold|Bob|Charlie|David"
       End With
       With cmbCombo1     ' VB ComboBox, Style = 2 (Dropdown list)
          .AddItem "Arnold"
          .AddItem "Bob"
       End With
       With cmbComboBoxW1 ' CCR ComboBox, Style = 2 (Dropdown list)
          .AddItem "Arnold"
          .AddItem "Bob"
       End With
    End Sub
    
    Private Sub cmdRemoveItems_Click()
       VBFlexGrid1.ComboItems = vbNullString
       cmbCombo1.Clear
       cmbComboBoxW1.Clear
    End Sub
    Name:  DropDownList.gif
Views: 228
Size:  44.6 KB

  29. #1269
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    I don't understand really how it works, but sometimes I can see the drop-down list in both comboboxes and sometimes I can't...

  30. #1270
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Arrow Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Here I use the RemoveItem instead of Clear.

    Code:
    Private Sub cmdAddItems_Click()
       With VBFlexGrid1
          .CellComboCue = FlexComboCueDropDown
          .ComboMode = FlexComboModeDropDown
          .ComboItems = "Arnold|Bob|Charlie|David"
       End With
       With cmbCombo1     ' VB ComboBox, Style = 2 (Dropdown list)
          .AddItem "Arnold"
       End With
       With cmbComboBoxW1 ' CCR ComboBox, Style = 2 (Dropdown list)
          .AddItem "Arnold"
       End With
    End Sub
    
    Private Sub cmdRemoveItems_Click()
       VBFlexGrid1.ComboItems = vbNullString
       cmbCombo1.RemoveItem 0
       cmbComboBoxW1.RemoveItem 0
    End Sub
    Name:  DropDownList2.gif
Views: 212
Size:  40.4 KB

  31. #1271
    Lively Member
    Join Date
    Oct 2014
    Posts
    92

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    Set CellChecked to FlexTextAsCheckBox.



    Process the EditKeyPress event and set KeyChar to 0 fur unwanted chars.
    Code:
    Private Sub Form_Load()
        Set Me.VBFlexGrid1.DataSource = GetRs("SELECT  * FROM tblDataTaye;")
        With Me.VBFlexGrid1
            .CellChecked = FlexTextAsCheckBox
            
        End With
        
        Set Me.VSFlexGrid1.DataSource = GetRs("SELECT  * FROM tblDataTaye;")
    
    End Sub
    Name:  VFGDEMO.jpg
Views: 207
Size:  30.1 KB

    Hello Krool! I've set the ". CellChecked = FlexTextAsCheckBox", but you can't make the column of a Boolean field appear as the corresponding checkbox. The above is my code, please guide me on how to modify the code so that these Boolean fields (Boolean, Enabled, Allow, Delete) can be displayed according to the corresponding checkboxes of the field values. If you're convenient, add a demonstration of how to use the Boolean field display checkbox to this VBFlexGridDemo. Thank you very much!

    VSFGTest1.1.zip
    Last edited by smileyoufu; Feb 16th, 2024 at 09:30 AM.

  32. #1272
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Arrow Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by smileyoufu View Post
    Code:
    Private Sub Form_Load()
        Set Me.VBFlexGrid1.DataSource = GetRs("SELECT  * FROM tblDataTaye;")
        With Me.VBFlexGrid1
            .CellChecked = FlexTextAsCheckBox
            
        End With
        
        Set Me.VSFlexGrid1.DataSource = GetRs("SELECT  * FROM tblDataTaye;")
    
    End Sub
    Name:  VFGDEMO.jpg
Views: 207
Size:  30.1 KB

    Hello Krool! I've set the ". CellChecked = FlexTextAsCheckBox", but you can't make the column of a Boolean field appear as the corresponding checkbox. The above is my code, please guide me on how to modify the code so that these Boolean fields (Boolean, Enabled, Allow, Delete) can be displayed according to the corresponding checkboxes of the field values. If you're convenient, add a demonstration of how to use the Boolean field display checkbox to this VBFlexGridDemo. Thank you very much!

    VSFGTest1.1.zip
    Code:
    Private Sub Form_Load()
        Set Me.VBFlexGrid1.DataSource = GetRs("SELECT  * FROM tblDataTaye;")
        With Me.VBFlexGrid1
            .FillStyle = FlexFillStyleRepeat
            .Cell(FlexCellChecked, .FixedRows, 2, .Rows - 1, 5) = FlexTextAsCheckBox
        End With
    
        Set Me.VSFlexGrid1.DataSource = GetRs("SELECT  * FROM tblDataTaye;")
    End Sub
    Last edited by Nouyana; Feb 16th, 2024 at 11:35 AM. Reason: fixing the error in code

  33. #1273

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Nouyana,
    I can't replicate the "no drop-down list" thing. However, I fixed now a bug that the drop-down list is not clickable anymore when it's empty. So that the list will not be closed anymore and mouse capture is released.
    The same behavior as a ComboBox..

  34. #1274
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Arrow Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    I fixed now a bug that the drop-down list is not clickable anymore when it's empty.
    Looks better. Thank you, Krool.

  35. #1275

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Update released.

    Included the DragRow/DragCol function used to rearrange rows/cols by dragging the specified row/col with the mouse to a new position.
    To note is that this is NOT an OLE drag/drop operation and the function will enter a modal message loop to just return the new moved position. (like vsFlexGrid)

    The demo project is updated to use this new internal function.
    Example code:
    Code:
    Private Sub VBFlexGrid1_BeforeMouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single, Cancel As Boolean)
    With VBFlexGrid1
    If Button = vbLeftButton And (Shift And vbAltMask) = vbAltMask Then
        .HitTest X, Y
        If .HitResult = FlexHitResultCell Then
            If .HitCol < .FixedCols And .HitRow >= .FixedRows Then
                VBFlexGrid1.RowPosition(.HitRow) = VBFlexGrid1.DragRow(.HitRow)
                Cancel = True
            ElseIf .HitCol >= .FixedCols And .HitRow < .FixedRows Then
                VBFlexGrid1.ColPosition(.HitCol) = VBFlexGrid1.DragCol(.HitCol)
                Cancel = True
            End If
        End If
    End If
    End With
    End Sub
    The OCX VBFLXGRD17 was also updated. The internal type lib version is now 1.6.

    Code:
    Object={2DA70529-3366-414A-B408-46083BCD481B}#1.6#0; VBFLXGRD17.OCX

  36. #1276
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    304

    Thumbs up Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    Included the DragRow/DragCol function
    Great job, Krool! You make things easier!

    I don't know why, but I can't unzip your new attachments. did you change the archiver? I use "7-zip" 24.01 (2024-01-31). I had to download files from Github.

    Maybe something is wrong with this forum. The "Reply with quote" button doesn't work for me today too...

  37. #1277

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    That seems to be a forum issue about the invalid zip file..

    EDIT: zip file working again
    Last edited by Krool; Feb 21st, 2024 at 02:00 PM.

  38. #1278
    Member
    Join Date
    May 2021
    Posts
    40

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Hi Krool,
    One question, with the combbox insert in a cell, dropdown is ok, leave the cell, it seems the combbox item already transfered to the cell, but when I use msgbox to read the cell text, it shows nothing! any idea or method about it?
    Thanks.
    John

    PS: Sorry I use a timer to read the cell text and the above issue occured. Solved the problem.
    Last edited by JT870; Feb 19th, 2024 at 05:14 AM.

  39. #1279

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,363

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    JT870,
    please provide some code. Otherwise it's hard to imagine ..
    Maybe you MsgBox the .EditText which of course is reset once editing is finished.

  40. #1280
    Lively Member
    Join Date
    May 2022
    Posts
    80

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Hi again!

    When one column is a combobox column, and the list inside is wider than the column... it's possible to adjust the column before assigning one value?

    i mean:

    Before assigning a value:

    Name:  cap1.png
Views: 56
Size:  1.4 KB

    Selecting it:

    Name:  cap2.png
Views: 56
Size:  3.0 KB

    Selected:

    Name:  cap3.png
Views: 54
Size:  2.4 KB

    It's possible to autoadjust the width of the column "before" selecting anyhing ?

Page 32 of 33 FirstFirst ... 222930313233 LastLast

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