Page 29 of 30 FirstFirst ... 192627282930 LastLast
Results 1,121 to 1,160 of 1180

Thread: VBFlexGrid Control (Replacement of the MSFlexGrid control)

  1. #1121
    New Member
    Join Date
    Mar 2022
    Posts
    7

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Good morning Krool, I hope you are well, well the present is that in the mega link that I just posted is the improved vbflexgrid with features such as toggle button, progress bar, etc.
    It would be very helpful if you adapted it to your latest version of your vbflexgrid.
    Honestly, it would be a great advance in the project.


    We would all be grateful.

    Mega link:
    https://mega.nz/file/9Zl0ET6Q#ZIERxd...tnZN4FVrzctYGY

  2. #1122
    Lively Member
    Join Date
    May 2022
    Posts
    69

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    And if you can solve the problem with 2 or more grids in the same mdi form, that hangs everything in IDE... i will be eternally grateful too :-)

  3. #1123

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Calcu View Post
    And if you can solve the problem with 2 or more grids in the same mdi form, that hangs everything in IDE... i will be eternally grateful too :-)
    I can't replicate. What do you mean exactly? Demo ?

  4. #1124
    Lively Member
    Join Date
    Oct 2014
    Posts
    87

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by lizanodiaz View Post
    Good morning Krool, I hope you are well, well the present is that in the mega link that I just posted is the improved vbflexgrid with features such as toggle button, progress bar, etc.
    It would be very helpful if you adapted it to your latest version of your vbflexgrid.
    Honestly, it would be a great advance in the project.


    We would all be grateful.

    Mega link:
    https://mega.nz/file/9Zl0ET6Q#ZIERxd...tnZN4FVrzctYGY
    Hello Lizanodiaz!

    The hyperlink cannot be opened. Can you upload the source code file for reference and learning? Thank you very much!

  5. #1125
    New Member
    Join Date
    Mar 2022
    Posts
    7

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

    Quote Originally Posted by smileyoufu View Post
    Hello Lizanodiaz!

    The hyperlink cannot be opened. Can you upload the source code file for reference and learning? Thank you very much!
    Here please:

    https://www.4shared.com/s/fZvAhWyOdku

  6. #1126

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Update released.

    Included the AllowIncrementalSearch property.

    Name:  FlexAllowIncrementalSearch.gif
Views: 618
Size:  37.1 KB

  7. #1127
    Lively Member
    Join Date
    May 2022
    Posts
    69

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    post 855 + 856 - you will have an example and a video

    it was when 2 or more grid were in a same MDI form, if you write any line of code or add any control and press save, you will see the grids grayed.

    and if you execute the program, it hangs.

    you said it was because UserControl_Terminate was not fired first time, i think is for this, only 1 grid is unloaded from memory and then when you run it again, just closes everything

  8. #1128

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Calcu View Post
    post 855 + 856 - you will have an example and a video

    it was when 2 or more grid were in a same MDI form, if you write any line of code or add any control and press save, you will see the grids grayed.

    and if you execute the program, it hangs.

    you said it was because UserControl_Terminate was not fired first time, i think is for this, only 1 grid is unloaded from memory and then when you run it again, just closes everything
    That's natural. The IDE can zombify UserControls (hatched/grayed) when it wants to. There is no way to avoid it.
    A possible solution would be to use the OCX.
    Others use the OCX during IDE design-time and when compiling switch to the Std-Exe version. See MountainMan's OCX2StdExe Update/Compile Utility

  9. #1129

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by jpbro View Post
    I'm a big fan of Before* events with a Cancel parameter, e.g.:

    Code:
    Public Event BeforePaste(ByRef Text As String, ByRef Cancel As Boolean)
    Setting Cancel = True will abort the paste operation.


    Another advantage of a BeforePaste event is that you can "massage" the incoming data if necessary (for example, de-formatting currency strings, normalizing date string, etc...).
    Update released.

    Included the BeforePaste(ByRef Text As String, ByRef Cancel As Boolean) and AfterPaste() event.

    Included the ParseClip/ConstructClip function.

    Those parse/construct helper functions are especially useful in the BeforePaste event. Of course they can be used outside of it as well.
    Example:

    Code:
    Private Sub VBFlexGrid1_BeforePaste(Text As String, Cancel As Boolean)
    With VBFlexGrid1
    .ClipSeparatorRow = vbCrLf
    .ClipSeparatorCol = vbTab
    If Right$(Text, Len(.ClipSeparatorRow)) = .ClipSeparatorRow Then ' Excel
        ' Exclude last empty line.
        Text = Left$(Text, Len(Text) - Len(.ClipSeparatorRow))
    End If
    ' Parse clip string into an two-dimensional array indexed by row/col subscripts.
    Dim ArrRows As Variant
    ArrRows = .ParseClip(Text)
    '
    ' Validate and modify the array...
    '
    ' Re-construct text from the modified array.
    Text = .ConstructClip(ArrRows)
    End With
    End Sub
    The BeforePaste event can also be useful in conjunction with .ClipPasteMode = FlexClipPasteModeAutoSelection
    Example:
    Code:
    ' Ensure that auto selection will have enough rows available.
    .ClipPasteMode = FlexClipPasteModeAutoSelection
    Dim TopRow As Long
    .GetSelRange TopRow, 0, 0, 0
    If (TopRow + (UBound(ArrRows) + 1)) > .Rows Then .Rows = (TopRow + (UBound(ArrRows) + 1))
    The AfterPaste event is most useful to make some auto sizing adjustment.
    Example:
    Code:
    Private Sub VBFlexGrid_AfterPaste()
    With VBFlexGrid1
    Dim LeftCol As Long, RightCol As Long
    .GetSelRange 0, LeftCol, 0, RightCol
    .AutoSize LeftCol, RightCol, FlexAutoSizeModeColWidth
    End With
    End Sub
    The .ParseClip function also have optional Rows/Cols parameters to restrict maximal ubounds for the created array.
    Code:
    ByRef Text As String, Optional ByVal Rows As Long = -1, Optional ByVal Cols As Long = -1
    Last edited by Krool; Sep 25th, 2023 at 03:44 PM.

  10. #1130
    Lively Member
    Join Date
    May 2022
    Posts
    69

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    But it only happens when 2 or more grids are in the same form, if you have only one, it never hangs, i'm pretty sure it's happening when trying to terminate the second control, it's hanging in there :-(

    I' using a control (uctabmdi) that has a routine to stop all subclasing passing the windows handle, maybe with something like this it will stop hanging?, i tried to apply it to your control, but... lack of knowledege to do it :-(

    Attached the uctabmdi.ctl, maybe you can see how it handles subclassing and... it shows an idea about how to avoid this problem ?

    A really big thanks for everything.
    Attached Files Attached Files

  11. #1131
    Lively Member
    Join Date
    May 2022
    Posts
    69

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Hi all,

    A question. If i have one combo cell, with 3 items (s|n|x).. can I paste other option (for example a 't') without reloading everything ?

    I think in a combo cell i can't write anything.

    EDIT!

    Found it. just simple as change

    .ColComboMode(.Col) = FlexComboModeDropDown

    with

    .ColComboMode(.Col) = FlexComboModeEditable



    Thanks!
    Last edited by Calcu; Sep 28th, 2023 at 10:00 AM.

  12. #1132
    Addicted Member
    Join Date
    Jan 2012
    Posts
    239

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    I feel a little embarrassed having to ask this, but Iím drawing a blank, and searches didnít bring up any solution.

    The user can select a range of cells in the grid, and then execute an action against the selected cells. However, the exact action depends on the cellís contents.

    My idea is to cycle through the cells, evaluate each cellís contents, and apply the correct action. However, how do I know which cells are the ones that are selected?

  13. #1133

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Update released.

    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.

  14. #1134

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Erwin69 View Post
    I feel a little embarrassed having to ask this, but Iím drawing a blank, and searches didnít bring up any solution.

    The user can select a range of cells in the grid, and then execute an action against the selected cells. However, the exact action depends on the cellís contents.

    My idea is to cycle through the cells, evaluate each cellís contents, and apply the correct action. However, how do I know which cells are the ones that are selected?
    Yes, looping through selection is then the way to go.

    Code example:

    Code:
    Dim TopSel As Long, LeftSel As Long, BottomSel As Long, RightSel As Long
    VBFlexGrid1.GetSelRange TopSel, LeftSel, BottomSel, RightSel
    Dim iRow As Long, iCol As Long
    For iRow = TopSel To BottomSel
        For iCol = LeftSel To RightSel
            Select Case VBFlexGrid1.TextMatrix(iRow, iCol)
                Case "content1 of each cell in selection"
                    ' Take your action
                Case "content2 of each cell in selection"
                    ' or something else
            End Select
        Next iCol
    Next iRow

  15. #1135
    Addicted Member
    Join Date
    Jan 2012
    Posts
    239

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    Yes, looping through selection is then the way to go.

    Code example:

    Code:
    Dim TopSel As Long, LeftSel As Long, BottomSel As Long, RightSel As Long
    VBFlexGrid1.GetSelRange TopSel, LeftSel, BottomSel, RightSel
    Dim iRow As Long, iCol As Long
    For iRow = TopSel To BottomSel
        For iCol = LeftSel To RightSel
            Select Case VBFlexGrid1.TextMatrix(iRow, iCol)
                Case "content1 of each cell in selection"
                    ' Take your action
                Case "content2 of each cell in selection"
                    ' or something else
            End Select
        Next iCol
    Next iRow

    I'm actually evaluating the CellPicture, which doesn't seem to work with the TextMatrix. I now simply select the cell using the counters in the For...Next loops, and do the check. Or would there be a better way?

  16. #1136

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Erwin69 View Post
    I'm actually evaluating the CellPicture, which doesn't seem to work with the TextMatrix. I now simply select the cell using the counters in the For...Next loops, and do the check. Or would there be a better way?
    Instead of .TextMatrix use:
    Code:
    VBFlexGrid1.Cell(FlexCellPicture, iRow, iCol)

  17. #1137
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    188

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Dear Krool,

    Warm Greetings!

    I observed just a while ago the following:
    --
    I have 3 columns in a grid. The 2nd column has checkboxes. The columns are resizable. If I resize all the columns to near-zero width, then the checkboxes alone show up at the end of all the shrunk columns. If my observation is not right, then kindly let me know what one has to do so that the checkboxes do not get displayed.
    --

    By the way, in a normal combobox, using API, we can increase the width of the dropdown so that the longest item is also visible fully. How to do the same with the combo dropdown in our Flexgrid. I tried a hack some weeks back but it did not work (If I remember right, I think I increased the width of the column header in BeforeEdit event (to match the length of the longest item in the list) and then again shrunk back the width to its original size).

    I take this opportunity to once again thank you profoundly for ALL your wonderful wonderful wonderful controls and great support.

    Kind Regards.

  18. #1138

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by softv View Post
    Dear Krool,

    Warm Greetings!

    I observed just a while ago the following:
    --
    I have 3 columns in a grid. The 2nd column has checkboxes. The columns are resizable. If I resize all the columns to near-zero width, then the checkboxes alone show up at the end of all the shrunk columns. If my observation is not right, then kindly let me know what one has to do so that the checkboxes do not get displayed.
    --

    By the way, in a normal combobox, using API, we can increase the width of the dropdown so that the longest item is also visible fully. How to do the same with the combo dropdown in our Flexgrid. I tried a hack some weeks back but it did not work (If I remember right, I think I increased the width of the column header in BeforeEdit event (to match the length of the longest item in the list) and then again shrunk back the width to its original size).

    I take this opportunity to once again thank you profoundly for ALL your wonderful wonderful wonderful controls and great support.

    Kind Regards.
    1. Thanks, will look into it.

    2. It can done as following: (example)
    Code:
    Private Sub VBFlexGrid1_EditSetupWindow(BackColor As stdole.OLE_COLOR, ForeColor As stdole.OLE_COLOR)
    Dim RC As RECT
    If VBFlexGrid1.hWndComboList <> 0 Then
        GetWindowRect VBFlexGrid1.hWndComboList, RC
        Const MIN_WIDTH_PX As Long = 100
        If (RC.Right - RC.Left) < MIN_WIDTH_PX Then
            SetWindowPos VBFlexGrid1.hWndComboList, 0, 0, 0, MIN_WIDTH_PX, (RC.Bottom - RC.Top), SWP_NOACTIVATE Or SWP_NOMOVE Or SWP_NOOWNERZORDER Or SWP_NOZORDER
        End If
    End If
    End Sub

  19. #1139

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by softv View Post
    Dear Krool,

    Warm Greetings!

    I observed just a while ago the following:
    --
    I have 3 columns in a grid. The 2nd column has checkboxes. The columns are resizable. If I resize all the columns to near-zero width, then the checkboxes alone show up at the end of all the shrunk columns. If my observation is not right, then kindly let me know what one has to do so that the checkboxes do not get displayed.
    --

    By the way, in a normal combobox, using API, we can increase the width of the dropdown so that the longest item is also visible fully. How to do the same with the combo dropdown in our Flexgrid. I tried a hack some weeks back but it did not work (If I remember right, I think I increased the width of the column header in BeforeEdit event (to match the length of the longest item in the list) and then again shrunk back the width to its original size).

    I take this opportunity to once again thank you profoundly for ALL your wonderful wonderful wonderful controls and great support.

    Kind Regards.
    I can't repro with the checkboxes. Demo please..

  20. #1140

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Update released.

    Changing TopRow/LeftCol by app code now works even when there are no scrollbars. (like in vsFlexGrid)

    Also the Scroll event is fired then in such a "no scroll bar" scenario, forced by code. (again, like in vsFlexGrid)

    Minor tweak also, the order of 2x Scroll event (e.g. Ctrl+End) is now TopRow then LeftCol to match MS(H)FlexGrid and vsFlexGrid.
    Should be negligible but worth mentioning. (prior to this change the LeftCol was changed first and then TopRow)

  21. #1141
    Addicted Member
    Join Date
    Jan 2012
    Posts
    239

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Hi Krool,

    I meant to ask this before, forgot, but your message reminded me:

    Is it possible to display a vertical scrollbar permanently, even if the number of rows wouldn't require one? I like the columns to fill the width of the grid nicely, so that there is no "unused space" on the right, but it's always a pain to deal with resizing them depending on whether a vertical scrollbar is displayed or not.

    Thanks,
    Erwin

  22. #1142

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Erwin69 View Post
    Hi Krool,

    I meant to ask this before, forgot, but your message reminded me:

    Is it possible to display a vertical scrollbar permanently, even if the number of rows wouldn't require one? I like the columns to fill the width of the grid nicely, so that there is no "unused space" on the right, but it's always a pain to deal with resizing them depending on whether a vertical scrollbar is displayed or not.

    Thanks,
    Erwin
    Did you consider the ExtendLastCol property?
    And/Or the DisableNoScroll property?

  23. #1143
    Addicted Member
    Join Date
    Jan 2012
    Posts
    239

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    Did you consider the ExtendLastCol property?
    And/Or the DisableNoScroll property?
    Learning every day! DisableNoScroll will do the trick.

    Didn't find the ExtendLastCol, has it been added after release 1.4?

  24. #1144
    Lively Member
    Join Date
    May 2022
    Posts
    69

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Uh.. a LOT of good changes since 1.4 xD

    Just update it, speed, new features... buf..

  25. #1145
    Addicted Member
    Join Date
    Jan 2012
    Posts
    239

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Hi,

    FASTEST WAY TO MOVE A SET OF DATA INTO A GRID
    When working with sets of data, there is for example the Recordset.GetRows feature to quickly move all data retrieved from a database into an array. For exporting to Excel there is the Range.Resize function to quickly move the data from an array into a worksheet.

    I guess the VBFlexGrid control offers such features as well, but haven't figured it out yet. If it indeed does, can you give me some pointers on how to do that?

    Thanks,
    Erwin

  26. #1146
    Lively Member
    Join Date
    May 2022
    Posts
    69

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Exactly the same way, with the .getrows feature

    Sorry, i read too fast, the .getrows is working to fill de grid, about the export feature ... i will wait for Krool answer xD

  27. #1147

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Erwin69 View Post
    Hi,

    FASTEST WAY TO MOVE A SET OF DATA INTO A GRID
    When working with sets of data, there is for example the Recordset.GetRows feature to quickly move all data retrieved from a database into an array. For exporting to Excel there is the Range.Resize function to quickly move the data from an array into a worksheet.

    I guess the VBFlexGrid control offers such features as well, but haven't figured it out yet. If it indeed does, can you give me some pointers on how to do that?

    Thanks,
    Erwin
    The fastest way is to not move the data into grid.
    Just use .GetRows of your db and use .FlexDataSource to feed the grid from your .GetRows array per-demand for the current viewport.

  28. #1148
    Addicted Member
    Join Date
    Jan 2012
    Posts
    239

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Thanks for the quick reply, but I wonder if that is the best approach given the specific situation I'm dealing with.

    I didn't want to make the original question too complex/large, but maybe I should have added some additional info.

    The process is as follows:

    1. The user selects some options
    2. Based on those the data is retrieved from the database (normally < 1000 records, usually even < 300)
    3. The user then applies "actions" to the grid (think popup menu or double click cells to mark them)
    4. Cell contents change based on the action that is applied.

    Once done, all rows that require and action are "batch processed".

    Actions are not done on the records that were originally retrieved. As a generic example, that should be easier to understand than the industry specific thing I'm working on, think of retrieving a list of tasks that then are assigned to different people. Tasks in rows, people in columns. Double clicking the cell where the column and row crosses, changes its contents in a + when a task is assigned, or a - when it's taken away from the person. In the batch processing, an email is created for each person with the assigned tasks.

    Knowing this, do you still feel that using the FlexDataSource is the best way to go?

  29. #1149

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    How do you currently feed the grid? 1000 rows shouldbe feeded instantly with just setting .TextMatrix with 2 loops..

  30. #1150
    Addicted Member
    Join Date
    Jan 2012
    Posts
    239

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Krool View Post
    How do you currently feed the grid? 1000 rows shouldbe feeded instantly with just setting .TextMatrix with 2 loops..
    I currently use two nested For...Next loops to cycle through rows and columns, and assign values to each cell. I figured that there would be something as TextMatrix that would help making that easier / quicker, but couldn't find an example of it.

    (You may have seen a similar question in the Common Controls Replacement thread related to the ListView control. In that case we're more often dealing with larger numbers of records, where the listview is more used as an step in between the database and an Excel sheet. While I was at it, I thought to ask the question here as well as part of learning new things, and potentially reconsidering which control to use for what.)

  31. #1151
    Lively Member
    Join Date
    May 2022
    Posts
    69

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Hi all, is there any way to remember the last active cell ?

    (not so easy xD) i mean: i have a MDI program, VBflexgrid is on one Form, i open the form and fill the grid, i select row 4 and column 6, not for edit, just select it.

    I change to another program, firefox, for example, and then when i return to my program, R4-C6 is not selected.

    I tried to save the row / col in form_lostfocus in 2 variables, and return them in form_getfocus but it's not working...

    Any idea ?
    Last edited by Calcu; Oct 14th, 2023 at 04:21 PM.

  32. #1152

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Calcu View Post
    Hi all, is there any way to remember the last active cell ?

    (not so easy xD) i mean: i have a MDI program, VBflexgrid is on one Form, i open the form and fill the grid, i select row 4 and column 6, not for edit, just select it.

    I change to another program, firefox, for example, and then when i return to my program, R4-C6 is not selected.

    I tried to save the row / col in form_lostfocus in 2 variables, and return them in form_getfocus but it's not working...

    Any idea ?
    Normally the grid does not change the Row/Col (focus rect)
    Do you have a demo showing the issue ? I cannot follow to be honest.

  33. #1153

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Update released.

    Included the CellTag property which holds a variant to store any extra data.
    The variant is allocated only when needed to keep memory usage low.

    Included enum FlexClearTag for the .Clear method and included enum FlexCellTag for the .Cell property.

  34. #1154
    Addicted Member
    Join Date
    Jan 2012
    Posts
    239

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    I noticed that the number of rows has to be larger than the number of fixed rows when setting this through the properties in the IDE. However, it is no problem to change the number of rows to be equal to the number of fixed rows through code.


    The same question applies to columns.


    My approach is often to show the user an empty grid with only the header row, which then will be expanded with additional columns depending on selections.


    Is there a reason for this, or is it a bug? Or maybe this is fixed in a newer release than the 1.4 OCX I'm currently using?


    It's not a big thing, as it's easy to workaround in code, but I was just wondering.

    Regards,
    Erwin

  35. #1155

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Quote Originally Posted by Erwin69 View Post
    I noticed that the number of rows has to be larger than the number of fixed rows when setting this through the properties in the IDE. However, it is no problem to change the number of rows to be equal to the number of fixed rows through code.


    The same question applies to columns.


    My approach is often to show the user an empty grid with only the header row, which then will be expanded with additional columns depending on selections.


    Is there a reason for this, or is it a bug? Or maybe this is fixed in a newer release than the 1.4 OCX I'm currently using?


    It's not a big thing, as it's easy to workaround in code, but I was just wondering.
    The property page does not allow this, correct. As there all properties will be set. However, you can also set the Rows equal to FixedRows in the IDE. Just use the property pane and not the property page.

  36. #1156

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Update released.

    Included the ColImageList As Variant property. (like in vsFlexGrid)
    Either an ImageList object or an hImageList handle can be set. (vsFlexGrid allows only handle)
    Numeric text will be treated as an image index. (both, object or handle)
    Otherwise it will be tried to access the image index by it's key. (object only)
    The image alignment is based on the text alignment. (CellAlignment/ColAlignment/FixedAlignment)
    The cell text will become hidden if an image got drawn.

    Included the CellImageCallback event where the app can provide the image value.
    The Handled parameter must be set to True to overwrite the default behavior.
    It enables also a way to ensure that no image will be tried to retrieve for certain cells. (e.g. for fixed rows)

  37. #1157

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Update released.

    Quote Originally Posted by softv View Post
    I have 3 columns in a grid. The 2nd column has checkboxes. The columns are resizable. If I resize all the columns to near-zero width, then the checkboxes alone show up at the end of all the shrunk columns. If my observation is not right, then kindly let me know what one has to do so that the checkboxes do not get displayed.
    Ok, I could now replicate this issue.... checking on the last column brought this up.
    It's now fixed. Thanks.

    Name:  FlexClipCheckBox.png
Views: 192
Size:  1.4 KB

  38. #1158

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Included the overdue OLEDragDropScroll property. (default to True)

    The 1.6 OCX got this feature included (as defaulting to True anyway) but w/o property..

  39. #1159

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Update released.

    Included the DropHighlight/DropHighlightMode run-time property.

    The demo project got updated to use OLEDragDrop (instead of the "old" DragDrop) for the 'DragRow' demonstration.
    Due to OLEDragDropScroll the VBFlexGrid can now scroll while dragging the row.

  40. #1160

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,273

    Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)

    Update released.

    Included the InsertMark/InsertMarkMode run-time property.
    Included the HitTestInsertMark function.

    The demo project got updated to demonstrate the insertion mark feature.
    Last edited by Krool; Oct 27th, 2023 at 12:40 AM.

Page 29 of 30 FirstFirst ... 192627282930 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