-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
The source is available.
Why demand all this functionality? Just stay with vsFlexgrid if that control has all needed functionality
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Im looking for Tree Grid control with unicode support. (Tree Grid = Tree nodes that can be expanded/collapsed in the first column)
Is this possible with the VBFlexGrid Control ?
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
I added now for both VBCCR and VBFLXGRD a MIT license.md file in the GitHub repo.
I have the VBFLXGRD working in 64-bit WinForms, but there are still issues so I haven't check the code in to GitHub.
The WinForms version is intended to be compatible with the MSFLXGRD, and to that end implements the IMSFlexGrid and DMSFlexGridEvents interfaces.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Dear Krool, I wanted to ask you a great favor, the following, it would be possible to implement the ExtendLastCol of the VBFlexgrid, also taking into account if in case the last column is hidden (which would normally be the one with the ExtendLastCol) it will pass the ExtendLastCol to the penultimate column. Example we have 5 Columns if by one case it happens to hide column 5, then the ExtendLastCol would occupy column 4, and if I show column 5, column 5, it would become the one with the ExtendLastCol.
I greatly appreciate the sacrifice of your person for the good of the forum. I say goodbye to you awaiting your prompt response.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Has anyone had success getting this control to work with Access 2007 or higher? If so - how?
I've been able to get it to work in a VB6 app or an Access 2003, but upon trying to use it in Access 2007 by creating a new form and adding the control to the form, it immediately crashes the application.
I've also tried creating the form in Access 2003 and opening in Access 2007 - but it still crashes when I try to open the form.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
sstairs82
Has anyone had success getting this control to work with Access 2007 or higher? If so - how?
I've been able to get it to work in a VB6 app or an Access 2003, but upon trying to use it in Access 2007 by creating a new form and adding the control to the form, it immediately crashes the application.
I've also tried creating the form in Access 2003 and opening in Access 2007 - but it still crashes when I try to open the form.
Do you have 2003 and 2007 in parallel in 1 system? Maybe some temp files by office are disturbing each other.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
What Datagrid control supports DAO objects?-VBForums
https://www.vbforums.com/showthread....ts-DAO-objects
VBFlexGrid Control ,dose it support dao 3.6?
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
Do you have 2003 and 2007 in parallel in 1 system? Maybe some temp files by office are disturbing each other.
I only had VB6 and Access 2007 installed when trying to use the control in Access 2007.
I tried it in Access 2007 first by registering the OCX, then creating a new mdb file and a new form.
As soon as I try to drop the VBFlexGrid control onto the form, Access crashes.
I then created a new VB6 EXE and added the control. It worked.
I thought maybe I could add it in Access 2003 - so I installed Access 2003 alongside of Access 2007.
I created a new mdb and a new form and then added the control. It was successful.
Since this worked - I thought maybe I could open the MDB in Access 2007 - so I tried that - and the file opens, but upon opening the form, it crashes.
Event Viewer has this logged each time it crashes:
Faulting application name: MSACCESS.EXE, version: 12.0.6735.5000, time stamp: 0x561e089f
Faulting module name: ntdll.dll, version: 10.0.19041.1110, time stamp: 0x8a32a22a
Exception code: 0xc0000374
Fault offset: 0x000e6c23
Faulting process id: 0x2974
Faulting application start time: 0x01d792e9d2914d82
Faulting application path: C:\Program Files (x86)\Microsoft Office\Office12\MSACCESS.EXE
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report Id: 7bfb5f4e-a6c5-4c5c-ac72-db2a584a693a
Faulting package full name:
Faulting package-relative application ID:
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
I tested office 2002 (XP), 2010, 2016, 2019 and they worked.
You confirmed it works on 2003. So I have no possibility to test 2007.
Last try is to delete some temp files for VBFLXGRD in
Code:
C:\Users\<username>\AppData\Local\Temp\VBE\
Code:
C:\Users\<username>\Application Data\Microsoft\Forms\
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
I tested office 2002 (XP), 2010, 2016, 2019 and they worked.
You confirmed it works on 2003. So I have no possibility to test 2007.
Last try is to delete some temp files for VBFLXGRD in
Code:
C:\Users\<username>\AppData\Local\Temp\VBE\
Code:
C:\Users\<username>\Application Data\Microsoft\Forms\
I will try what you suggest - but if you have gotten it to work on Access 2010 - I will try it on another machine that has 2010 and see if it works for me. I will let you know.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
sstairs82
I will try what you suggest - but if you have gotten it to work on Access 2010 - I will try it on another machine that has 2010 and see if it works for me. I will let you know.
I tried it with 2010 and it still crashes for me (with the same exception). I'm wondering if my environment is not setup correctly...
Is this control designed as 32-bit, or 64-bit?
When you were successful in having it work, were you testing with 32-bit or 64-bit versions of Office?
Were there any specific steps you took when using this control?
I copied the OCX to my Windows\SYSWOW64 folder and registered it using RegSvr32, then tried to add it to a new form as an ActiveX control - Am I missing a step or doing something wrong?
All of my Office installations are 32-bit running on a 64-bit machine, so I'm wondering if I might be missing something or not have something setup correctly?
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Update released.
Bugfix for BottomRow/RightCol property related to FrozenRows/FrozenCols.
Also bugfix in the internal GetHitTestInfo function.
An adjustment was missing between the leftmost/topmost column/row and the non-scrollable columns/rows.
This affecty only for hit tests of divider column left and row top. (divider column right and row bottom not affected)
-
1 Attachment(s)
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
sstairs82
I tried it with 2010 and it still crashes for me (with the same exception). I'm wondering if my environment is not setup correctly...
Is this control designed as 32-bit, or 64-bit?
When you were successful in having it work, were you testing with 32-bit or 64-bit versions of Office?
Were there any specific steps you took when using this control?
I copied the OCX to my Windows\SYSWOW64 folder and registered it using RegSvr32, then tried to add it to a new form as an ActiveX control - Am I missing a step or doing something wrong?
All of my Office installations are 32-bit running on a 64-bit machine, so I'm wondering if I might be missing something or not have something setup correctly?
Yes, only office 32 bit works.
Most office installs are 64-bit, but I found one which is 32-bit Excel 2016.
And it works... (just tested)
I never tried MS Access though. Maybe there is something.. Can you test if on your side Excel is working? To have a common starting point and ensure no other issues.
Attachment 182112
EDIT: Tested on MS Access 2016 and it crashes. (clicking the "add ActiveX control")
Don't know what's going on..
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
Yes, only office 32 bit works.
Most office installs are 64-bit, but I found one which is 32-bit Excel 2016.
And it works... (just tested)
I never tried MS Access though. Maybe there is something.. Can you test if on your side Excel is working? To have a common starting point and ensure no other issues.
Attachment 182112
EDIT: Tested on MS Access 2016 and it crashes. (clicking the "add ActiveX control")
Don't know what's going on..
I appreciate the quick responses! I tested in Excel and it works for me in the later versions as well. However, I'd really like to use the control in Access 2010 or higher (we have a program that was developed for Access 2010 that wouldn't work well with an Excel User Form). Let me know if you find anything out.
-
1 Attachment(s)
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
Yes, only office 32 bit works.
Most office installs are 64-bit, but I found one which is 32-bit Excel 2016.
And it works... (just tested)
I never tried MS Access though. Maybe there is something.. Can you test if on your side Excel is working? To have a common starting point and ensure no other issues.
Attachment 182112
EDIT: Tested on MS Access 2016 and it crashes. (clicking the "add ActiveX control")
Don't know what's going on..
The VBFlexGrid.NET project was launched with Office 64-bit specifically in mind. We have now migrated a 22-year-old Excel-based application to managed code, and need a replacement for the MSFLXGRD. So far, so good: the VBFlexGrid.NET is working embedded in an ATL dialog in glorious x64.
Attachment 182118
Currently, only a subset of the VBFLXGRD functionality is fully migrated. When I have all the key functionality working, I'll upload it to the GitHub project.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
R.J. Dunnill
The VBFlexGrid.NET project was launched with Office 64-bit specifically in mind. We have now migrated a 22-year-old Excel-based application to managed code, and need a replacement for the MSFLXGRD. So far, so good: the VBFlexGrid.NET is working embedded in an ATL dialog in glorious x64.
Attachment 182118
Currently, only a subset of the VBFLXGRD functionality is fully migrated. When I have all the key functionality working, I'll upload it to the GitHub project.
Yes great. Thanks
You migrate 1.4 OCX version?
Do you include bugfixes? Like yesterday fixes.
When 1.5 OCX version comes out you migrate also?
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Here is an experimental version (VBFlexGrid.ctl only) for the ExtendLastCol property.
I don't have a VSFlexGrid to test out all the details so I made this now according to my gut feeling.
So please everyone interested in the ExtendLastCol. Please make extensive testings and report any misbehavior etc.
Thanks
Edit: Attachment removed to save space.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
Yes great. Thanks
You migrate 1.4 OCX version?
Do you include bugfixes? Like yesterday fixes.
When 1.5 OCX version comes out you migrate also?
Edit: I am trying to migrate both versions. I haven't added the bug fixes (but I will). I have a bunch of bugs from the migration I need to deal with, too.
I will migrate to the 1.5 versions when they are available.
And currently, the VBFlexGrid.NET is (almost) drop-in compatible with the MSFLXGRD. It embeds the MSFLXGRD type library and implements the IMSFlexGrid and DMSFlexGridEvents interfaces, although, unless the VBFlexGrid.NET type library is custom-edited and registered, the enumeration values are mis-named. (That's a shortfall of a COM-callable wrapper.)
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
Here is an experimental version (VBFlexGrid.ctl only) for the ExtendLastCol property.
I don't have a VSFlexGrid to test out all the details so I made this now according to my gut feeling.
So please everyone interested in the ExtendLastCol. Please make extensive testings and report any misbehavior etc.
Thanks
Edit: Attachment removed to save space.
Dear Krool, glad to hear from you.
Regarding the tests on the ExtendLastCol, it turns out:
1. At design time I set the ExtendLastcol property to the vbFlexgrid true, I execute it and I maximize it to the form and there is the first "error" as in the picture. A double line of the last visible column is created, and if you resize it, several lines appear.
Taking advantage of the message my friend Krool how can I solve this problem that I have, of the Zip attachment. what I am looking for is to order in ascending and descending order of any column but for a strange reason it does not allow me. Attachment 182139
to which I mean the order of the example is in the form = "UserEditingForm"Attachment 182139
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
lizano diaz
Dear Krool, glad to hear from you.
Regarding the tests on the ExtendLastCol, it turns out:
1. At design time I set the ExtendLastcol property to the vbFlexgrid true, I execute it and I maximize it to the form and there is the first "error" as in the picture. A double line of the last visible column is created, and if you resize it, several lines appear.
Taking advantage of the message my friend Krool how can I solve this problem that I have, of the Zip attachment. what I am looking for is to order in ascending and descending order of any column but for a strange reason it does not allow me.
Attachment 182139
to which I mean the order of the example is in the form = "UserEditingForm"
Attachment 182139
Attachment 182142
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Here is an updated (v2) experimental version (VBFlexGrid.ctl only) for the ExtendLastCol property.
Please everyone interested in the ExtendLastCol. Please make extensive testings and report any bugs/misbehavior etc.
The behavior is most important as this was done according to my gut feeling. I don't have a vsFlexGrid to compare the behavior.
Thanks
Edit: Removed attachment to save space.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
Here is an updated (v2) experimental version (VBFlexGrid.ctl only) for the ExtendLastCol property.
Please everyone interested in the ExtendLastCol. Please make extensive testings and report any bugs/misbehavior etc.
The behavior is most important as this was done according to my gut feeling. I don't have a vsFlexGrid to compare the behavior.
Thanks
Dear Krool thank you very much for the update, the Extend LastCol seems to work fine. There is a small detail you can see in the attached picture. Apart from this, I wanted to take advantage of asking, how would it be done to sort (ascending, descending) when clicking on the header of the grid, regardless of whether the data in the columns are of type date, string, etc. Thank you very much for your answers.Attachment 182148
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
lizano diaz
Dear Krool thank you very much for the update, the Extend LastCol seems to work fine. There is a small detail you can see in the attached picture. Apart from this, I wanted to take advantage of asking, how would it be done to sort (ascending, descending) when clicking on the header of the grid, regardless of whether the data in the columns are of type date, string, etc. Thank you very much for your answers.
Attachment 182148
I can't replicate your picture issue and with rows set to 300.
Concerning your sorting. Below is a code example showing how it can be done. Please note to fill in .ColData() on all columns on your data population with the VarType values. (e.g. vbString, vbDate)
Code:
Private LastColSort As Long
Private Sub Form_Load()
LastColSort = -1
End Sub
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
.HitTest X, Y
If .HitResult = FlexHitResultCell And .HitRow < .FixedRows And .HitCol > .FixedCols - 1 Then
If (Button And vbLeftButton) = vbLeftButton Then
.Sort = FlexSortNone
If LastColSort > -1 And LastColSort <> .HitCol Then .ColSort(LastColSort) = FlexSortNone
LastColSort = .HitCol
Call FlexSetColSort(VBFlexGrid1, LastColSort, True)
.Cell(FlexCellSort, .FixedRows, LastColSort, .Rows - 1, LastColSort) = FlexSortUseColSort
Cancel = True
End If
End If
End With
End Sub
Public Sub FlexSetColSort(ByRef This As VBFlexGrid, ByVal iCol As Long, ByVal Toggle As Boolean)
With This
Select Case .ColData(iCol)
Case vbString
If Toggle = True Then
If .ColSort(iCol) = FlexSortStringAscending Then
.ColSort(iCol) = FlexSortStringDescending
Else
.ColSort(iCol) = FlexSortStringAscending
End If
Else
If .ColSort(iCol) <> FlexSortStringDescending Then .ColSort(iCol) = FlexSortStringAscending
End If
Case vbDate
If Toggle = True Then
If .ColSort(iCol) = FlexSortDateAscending Then
.ColSort(iCol) = FlexSortDateDescending
Else
.ColSort(iCol) = FlexSortDateAscending
End If
Else
If .ColSort(iCol) <> FlexSortDateDescending Then .ColSort(iCol) = FlexSortDateAscending
End If
Case vbCurrency
If Toggle = True Then
If .ColSort(iCol) = FlexSortCurrencyAscending Then
.ColSort(iCol) = FlexSortCurrencyDescending
Else
.ColSort(iCol) = FlexSortCurrencyAscending
End If
Else
If .ColSort(iCol) <> FlexSortCurrencyDescending Then .ColSort(iCol) = FlexSortCurrencyAscending
End If
Case vbDecimal, vbDouble, vbSingle, vbLong, vbInteger, vbByte
If Toggle = True Then
If .ColSort(iCol) = FlexSortNumericAscending Then
.ColSort(iCol) = FlexSortNumericDescending
Else
.ColSort(iCol) = FlexSortNumericAscending
End If
Else
If .ColSort(iCol) <> FlexSortNumericDescending Then .ColSort(iCol) = FlexSortNumericAscending
End If
Case Else
If Toggle = True Then
If .ColSort(iCol) = FlexSortGenericAscending Then
.ColSort(iCol) = FlexSortGenericDescending
Else
.ColSort(iCol) = FlexSortGenericAscending
End If
Else
If .ColSort(iCol) <> FlexSortGenericDescending Then .ColSort(iCol) = FlexSortGenericAscending
End If
End Select
End With
End Sub
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
I can't replicate your picture issue and with rows set to 300.
Concerning your sorting. Below is a code example showing how it can be done. Please note to fill in .ColData() on all columns on your data population with the VarType values. (e.g. vbString, vbDate)
Code:
Private LastColSort As Long
Private Sub Form_Load()
LastColSort = -1
End Sub
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
.HitTest X, Y
If .HitResult = FlexHitResultCell And .HitRow < .FixedRows And .HitCol > .FixedCols - 1 Then
If (Button And vbLeftButton) = vbLeftButton Then
.Sort = FlexSortNone
If LastColSort > -1 And LastColSort <> .HitCol Then .ColSort(LastColSort) = FlexSortNone
LastColSort = .HitCol
Call FlexSetColSort(VBFlexGrid1, LastColSort, True)
.Cell(FlexCellSort, .FixedRows, LastColSort, .Rows - 1, LastColSort) = FlexSortUseColSort
Cancel = True
End If
End If
End With
End Sub
Public Sub FlexSetColSort(ByRef This As VBFlexGrid, ByVal iCol As Long, ByVal Toggle As Boolean)
With This
Select Case .ColData(iCol)
Case vbString
If Toggle = True Then
If .ColSort(iCol) = FlexSortStringAscending Then
.ColSort(iCol) = FlexSortStringDescending
Else
.ColSort(iCol) = FlexSortStringAscending
End If
Else
If .ColSort(iCol) <> FlexSortStringDescending Then .ColSort(iCol) = FlexSortStringAscending
End If
Case vbDate
If Toggle = True Then
If .ColSort(iCol) = FlexSortDateAscending Then
.ColSort(iCol) = FlexSortDateDescending
Else
.ColSort(iCol) = FlexSortDateAscending
End If
Else
If .ColSort(iCol) <> FlexSortDateDescending Then .ColSort(iCol) = FlexSortDateAscending
End If
Case vbCurrency
If Toggle = True Then
If .ColSort(iCol) = FlexSortCurrencyAscending Then
.ColSort(iCol) = FlexSortCurrencyDescending
Else
.ColSort(iCol) = FlexSortCurrencyAscending
End If
Else
If .ColSort(iCol) <> FlexSortCurrencyDescending Then .ColSort(iCol) = FlexSortCurrencyAscending
End If
Case vbDecimal, vbDouble, vbSingle, vbLong, vbInteger, vbByte
If Toggle = True Then
If .ColSort(iCol) = FlexSortNumericAscending Then
.ColSort(iCol) = FlexSortNumericDescending
Else
.ColSort(iCol) = FlexSortNumericAscending
End If
Else
If .ColSort(iCol) <> FlexSortNumericDescending Then .ColSort(iCol) = FlexSortNumericAscending
End If
Case Else
If Toggle = True Then
If .ColSort(iCol) = FlexSortGenericAscending Then
.ColSort(iCol) = FlexSortGenericDescending
Else
.ColSort(iCol) = FlexSortGenericAscending
End If
Else
If .ColSort(iCol) <> FlexSortGenericDescending Then .ColSort(iCol) = FlexSortGenericAscending
End If
End Select
End With
End Sub
Thank you very much for your answer, friend Krool, Taking advantage of the message, for when would you be launching new updates like, CheckBox, progress in cells, a drop-down Grid (for teacher - detail)?
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
I still wait for behavior (and bugs of course) feedback for the ExtendLastCol. Preferable from somebody who has a vsFlexGrid. Thanks
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
I still wait for behavior (and bugs of course) feedback for the ExtendLastCol. Preferable from somebody who has a vsFlexGrid. Thanks
My dear Krool, apparently the Extend LastCol code works correctly as far as I tested it, just notice in the appearance of the grid the following (attached picture), the one above is the VbFlexgrid and the one below is the vsFlexgrid:
1. When hovering the mouse over the line in the last column, the tip of the mouse appears in the shape of an arrow, on the other hand that arrow does not appear in the vsflexgrid.
2. When sorting by column in the vbflexgrid, it would be necessary to draw that arrow that indicates in which position it is ordered (red color of the picture).
3. The scrollbars are different in the two grids, the vbflexgrid is small and the vsflexgrid is large in proportion to the content (in pink).Attachment 182160
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
It’s a different control. You can’t expect it to be on the pixel the same as some other control.
If you like the vsFlexGrid so much why don’t you keep using it.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Arnoutdv
It’s a different control. You can’t expect it to be on the pixel the same as some other control.
If you like the vsFlexGrid so much why don’t you keep using it.
Hello dear
because the question is simple.
1.- Krool I was wondering if the extendlastcol presents any problem so that he can correct and give way to other properties.
2.- Krool and several contributors to the code what we are looking for is a similarity to VsFlexgrid in its properties and add many more functions.
quite apart from that Vsflexgrid will no longer have new improvements, instead our VbFlexgrid is open source and can have many more improvements.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
If it’s open source you can either contribute or create your own fork and add your specific requirements
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
lizano diaz
My dear Krool, apparently the Extend LastCol code works correctly as far as I tested it, just notice in the appearance of the grid the following (attached picture), the one above is the VbFlexgrid and the one below is the vsFlexgrid:
1. When hovering the mouse over the line in the last column, the tip of the mouse appears in the shape of an arrow, on the other hand that arrow does not appear in the vsflexgrid.
2. When sorting by column in the vbflexgrid, it would be necessary to draw that arrow that indicates in which position it is ordered (red color of the picture).
3. The scrollbars are different in the two grids, the vbflexgrid is small and the vsflexgrid is large in proportion to the content (in pink).
Attachment 182160
1. I don't know what you mean. On the blurry screenshots I see nothing.
2. Good idea. There are "sort arrow" chars that can be printed from a new property .ColSortArrow() which can be none, up or down. Leaving it to the app to deal with.
3. The scroll bar on vbFlexGrid is by column count. The nPage for proportional scroll bar is not used as this would require equal sized column widths.
Is the vsFlexGrid pixel based on the scrolling? If yes than nPage is easy to determine as it's just the client rect.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
What features are beyond MSFlexGrid?
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
In order to use the DataSource/DataMember property a reference to msdatsrc.tlb (pre-installed since Win2k) is required.
The same principle, how to select other controls in the property settings of the control?
For example, to develop a control ABC, add two control forms (names ABC1, ABC2), develop a control ccc, and want to set an attribute in control B2, you can choose ABC1 or ABC2. How to achieve this?
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
lizano diaz
My dear Krool, apparently the Extend LastCol code works correctly as far as I tested it, just notice in the appearance of the grid the following (attached picture), the one above is the VbFlexgrid and the one below is the vsFlexgrid:
1. When hovering the mouse over the line in the last column, the tip of the mouse appears in the shape of an arrow, on the other hand that arrow does not appear in the vsflexgrid.
2. When sorting by column in the vbflexgrid, it would be necessary to draw that arrow that indicates in which position it is ordered (red color of the picture).
3. The scrollbars are different in the two grids, the vbflexgrid is small and the vsflexgrid is large in proportion to the content (in pink).
Attachment 182160
Hello Krool, thank you very much for your reply.
What I'm trying to do now is to implement the code from post # 563 about column ordering in the same control, in such a way that the end user would only add the control in the form and in "load_form" the user could define its data type of columns
(example: Form_Load ()
VBFlexGrid1.ColData (1) = vbString
VBFlexGrid1.ColData (2) = vbInteger
VBFlexGrid1.ColData (3) = vbDate
VBFlexGrid1.ColData (4) = vbString
)
What do you think of the idea friend? At the moment I am indisposed due to health problems in the Bronchi.
I sincerely thank you for your support to the vb 6.0 community
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
lizano diaz
1. When hovering the mouse over the line in the last column, the tip of the mouse appears in the shape of an arrow, on the other hand that arrow does not appear in the vsflexgrid.
Ah. I maybe get what you want to say. Do you mean the resize arrows ?
You mean the vsFlexGrid does not allow to resize the last column in ExtendLastCol mode ?
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
Ah. I maybe get what you want to say. Do you mean the resize arrows ?
You mean the vsFlexGrid does not allow to resize the last column in ExtendLastCol mode ?
Hello friend Krool,
The Vsflexgrid when hovering the mouse over the last line, the mouse pointer changes to normal mode (Highlighted in the picture with the red box) and does not allow changing the size of the column from the last line, that is, from right to left, the other functions if normal.
Attachment 182173
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Here is an updated (v3) experimental version (VBFlexGrid.ctl only) for the ExtendLastCol property.
Internal fix (subscript out of range) and the extended last column cannot be user resized anymore.
Please everyone interested in the ExtendLastCol. Please make extensive testings and report any bugs/misbehavior etc.
The behavior is most important as this was done according to my gut feeling. I don't have a vsFlexGrid to compare the behavior.
Thanks
Edit: Removed attachment to save space.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
Here is an updated (v3) experimental version (VBFlexGrid.ctl only) for the ExtendLastCol property.
Internal fix (subscript out of range) and the extended last column cannot be user resized anymore.
Please everyone interested in the ExtendLastCol. Please make extensive testings and report any bugs/misbehavior etc.
The behavior is most important as this was done according to my gut feeling. I don't have a vsFlexGrid to compare the behavior.
Thanks
Hi Krool, excellent update now if it works perfect, you are a programming genius.
Friend a question: when would a new version be maybe already included (Progressbar, checkbox; in the cells, also a master-type drop-down grid would be excellent - detail, example picture attached).
My sincere thanks and a big hug to your person.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
lizano diaz
Hi Krool, excellent update now if it works perfect, you are a programming genius.
Friend a question: when would a new version be maybe already included (Progressbar, checkbox; in the cells, also a master-type drop-down grid would be excellent - detail, example picture attached).
My sincere thanks and a big hug to your person.
Remove your attachment, the screenshot is 10xxx Grid.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
DaveDavis
Remove your attachment, the screenshot is 10xxx Grid.
Hi there. Everything is an example, it is also available to all public; That does not mean exactly that everything is being done the same as the grid shown. There are several demo grid of similar characteristics
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
No one control contains all functions. If some functions are not too difficult, adding some is good.
In the end we still had to use multiple OCX controls.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Krool
Is there a way to sort items when clicking the column header?
thanks
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Adebiyi24
Krool
Is there a way to sort items when clicking the column header?
thanks
Hello, there is one of this form exposed in # 563.
but the ideal thing would be that everything goes within the same control and when loading the form - client the user can indicate what type of values are in each column of the grid and when clicking on the header of the grid indicate whether it is ascending or descending ( an arrow)
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
lizano diaz
thank you sir
-
2 Attachment(s)
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
Here is an updated (v3) experimental version (VBFlexGrid.ctl only) for the ExtendLastCol property.
Internal fix (subscript out of range) and the extended last column cannot be user resized anymore.
Please everyone interested in the ExtendLastCol. Please make extensive testings and report any bugs/misbehavior etc.
The behavior is most important as this was done according to my gut feeling. I don't have a vsFlexGrid to compare the behavior.
Thanks
--------------------------------------------------------------------------------------
If you need a comparison of VSFLEXGRID, there is an official trial version download link of the VSFLEXGRID control below. I hope it can be helpful to you.
Thank you very much Krool!
License conditions:
ComponentOne has a user-friendly distribution policy. We want every programmer to obtain a copy of VSFlexGrid 8.0 to try for as long as they wish. Those who like the product and find it useful may buy a license for a reasonable price. The only restriction is that unlicensed copies of VSFlexGrid 8.0 will display a ComponentOne banner every time they are loaded to remind developers to license the product.
Attachment 182226
Download link:
http://download3.componentone.com/pu...flex8/Updates/
Attachment 182227
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
ComponentOne creates a Gantt chart integrated with Microsoft Project. This company is very powerful, far more than just form controls like VSFLEXGRID. Report printing, flowcharts, brain maps, almost omnipotent, as well as the web version of the WEB report.
The advantage of the .NET or ocx version is that you can add N different controls on one interface, visualize operations, and set any properties, and you can see the effect immediately.
Page web version echarts report and other controls or jquery.js
It lacks functions such as control combination, visual operation, binding, and smart code prompting.
The IDE made by web version JS, if you want to achieve similar functions of VB6, it may cost 100 billion US dollars.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Is there a flicker-free data refresh function and data cache function?
Ordinary DATAGRID or VSLEXGRID controls will redraw the entire control when refreshed, resulting in no data update or individual field values being modified, the controls are refreshed frequently, and the eyes are tired.
The desired function, refresh the data as little as possible, use less redrawing, and reduce flicker.
For example, to bind an ADO data record set, there are 3000 rows of data, and the visible part is 40 rows (the current cursor is 101-140 rows), if you want to refresh the control
If the data does not change, the UI control interface does not refresh. If only a few cells change, refresh the local cell text and redraw.
If the binding is a two-dimensional array, if there is only a small number of row and column changes, the grid control can reduce the refresh or only partial redraw, it is even more powerful.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
xiaoyao
Is there a flicker-free data refresh function and data cache function?
Ordinary DATAGRID or VSLEXGRID controls will redraw the entire control when refreshed, resulting in no data update or individual field values being modified, the controls are refreshed frequently, and the eyes are tired.
The desired function, refresh the data as little as possible, use less redrawing, and reduce flicker.
For example, to bind an ADO data record set, there are 3000 rows of data, and the visible part is 40 rows (the current cursor is 101-140 rows), if you want to refresh the control
If the data does not change, the UI control interface does not refresh. If only a few cells change, refresh the local cell text and redraw.
If the binding is a two-dimensional array, if there is only a small number of row and column changes, the grid control can reduce the refresh or only partial redraw, it is even more powerful.
Hello, I was just wondering, I don't know how that functionality could be done, if you can do it in any way, please, I would appreciate it if you could publish it.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Update released.
ExtendLastCol property finally included.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
Update released.
ExtendLastCol property finally included.
Friend Krool thank you very much for your contribution, one more question taking advantage of the thread: how could the exposed in # 564 be integrated for the ascending and descending ordering within the CTL (control) and on the other hand also that exposed in No. 586 , to update the data without having to redraw the grid ?.
Friend Krool thanks and greetings from a distance.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
xiaoyao
Is there a flicker-free data refresh function and data cache function?
Ordinary DATAGRID or VSLEXGRID controls will redraw the entire control when refreshed, resulting in no data update or individual field values being modified, the controls are refreshed frequently, and the eyes are tired.
The desired function, refresh the data as little as possible, use less redrawing, and reduce flicker.
For example, to bind an ADO data record set, there are 3000 rows of data, and the visible part is 40 rows (the current cursor is 101-140 rows), if you want to refresh the control
If the data does not change, the UI control interface does not refresh. If only a few cells change, refresh the local cell text and redraw.
If the binding is a two-dimensional array, if there is only a small number of row and column changes, the grid control can reduce the refresh or only partial redraw, it is even more powerful.
Hello again, what I was able to get from the grid function is a data refresh if I blink like this:
tuGrid.DataRefresh
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Update released.
Proportional thumb for the ScrollBars.
Quote:
Originally Posted by
lizano diaz
3. The scrollbars are different in the two grids, the vbflexgrid is small and the vsflexgrid is large in proportion to the content (in pink).
Attachment 182160
This is now fixed. I previously said this is not possible, but it was actually very easy...
the nPage member of the scrollinfo was set to 0.
Actually for the ScrollBar it has following formula for the maximum value.
Code:
nMax - max( nPage – 1, 0)
So, having an nPage of 1 or 0 is no difference.
The VBFlexGrid now sets it to 1, thus the thumb appears proportional. :)
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
Update released.
Proportional thumb for the ScrollBars.
This is now fixed. I previously said this is not possible, but it was actually very easy...
the nPage member of the scrollinfo was set to 0.
Actually for the ScrollBar it has following formula for the maximum value.
Code:
nMax - max( nPage – 1, 0)
So, having an nPage of 1 or 0 is no difference.
The VBFlexGrid now sets it to 1, thus the thumb appears proportional. :)
Hello friend, it does work well for the horizontal scrollbar, but it would still be missing for the Vertical scrollbar.
on the other hand you could help me with the code:
Select Case wMsg
Case WM_LBUTTONUP
RaiseEvent CellClick(.HitRow, .HitCol, vbLeftButton)
'''''''''''''''''''''''''''''''''''''''''''''''''
Me.HitTest X, y
'--- ORDENAR''''''''
'If .HitRow = 0 And .HitCol <> 0 Then
If .HitRow = 0 Then
Dim Row1 As Long, Row2 As Long
Dim Col1 As Long, Col2 As Long
Me.GetSelRange Row1, Col1, Row2, Col2
Me.RowID(Me.Row) = 1 ' Temporary identification
If (mlLastColumnOrder <> .HitCol) Or (mbOrdDesc) Then
'Me.Sort = FlexSortStringAscending ' = FlexSortStringNoCaseAscending
If Me.HitResult = FlexHitResultCell And Me.HitRow < Me.FixedRows And Me.HitCol > Me.FixedCols - 1 Then
If (vbLeftButton) = vbLeftButton Then
Me.Sort = FlexSortNone
' If LastColSort > -1 And LastColSort <> Me.HitCol Then Me.ColSort(LastColSort) = FlexSortNone
If LastColSort > -1 And LastColSort <> Me.HitCol Then Me.ColSort(LastColSort) = FlexSortNone
mlLastColumnOrder = Me.HitCol
Call FlexSetColSort(Me.VBFlexGrid1, LastColSort, True)
Me.Cell(FlexCellSort, Me.FixedRows, LastColSort, Me.Rows - 1, LastColSort) = FlexSortUseColSort
Cancel = True
End If
End If
mbOrdDesc = False
Else
' Me.Sort = FlexSortStringDescending ' = FlexSortStringNoCaseDescending
If .HitResult = FlexHitResultCell And .HitRow < Me.FixedRows And .HitCol > Me.FixedCols - 1 Then
If (vbLeftButton) = vbLeftButton Then
Me.Sort = FlexSortNone
If LastColSort > -1 And LastColSort <> .HitCol Then Me.ColSort(LastColSort) = FlexSortNone
LastColSort = .HitCol
Call FlexSetColSort(VBFlexGrid1, LastColSort, True)
Me.Cell(FlexCellSort, Me.FixedRows, LastColSort, Me.Rows - 1, LastColSort) = FlexSortUseColSort
Cancel = True
End If
End If
mbOrdDesc = True
End If
mlLastColumnOrder = .HitCol
Me.Row = Me.RowIndex(1)
Me.RowID(Me.RowIndex(1)) = 0 ' Remove temporary identification
Me.CellEnsureVisible
If Row1 <> Row2 Then Me.RowSel = IIf(Row1 < Me.Row, Row1, Row2)
If Col1 <> Col2 Then Me.ColSel = IIf(Col1 < Me.Col, Col1, Col2)
End If
'-------'FIN ORDENAR''''''''
''''
what I am looking for is that the ascending and descending order is within the control (ctl)Attachment 182281
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
lizano diaz
Hello friend, it does work well for the horizontal scrollbar, but it would still be missing for the Vertical scrollbar.
on the other hand you could help me with the code:
Select Case wMsg
Case WM_LBUTTONUP
RaiseEvent CellClick(.HitRow, .HitCol, vbLeftButton)
'''''''''''''''''''''''''''''''''''''''''''''''''
Me.HitTest X, y
'--- ORDENAR''''''''
'If .HitRow = 0 And .HitCol <> 0 Then
If .HitRow = 0 Then
Dim Row1 As Long, Row2 As Long
Dim Col1 As Long, Col2 As Long
Me.GetSelRange Row1, Col1, Row2, Col2
Me.RowID(Me.Row) = 1 ' Temporary identification
If (mlLastColumnOrder <> .HitCol) Or (mbOrdDesc) Then
'Me.Sort = FlexSortStringAscending ' = FlexSortStringNoCaseAscending
If Me.HitResult = FlexHitResultCell And Me.HitRow < Me.FixedRows And Me.HitCol > Me.FixedCols - 1 Then
If (vbLeftButton) = vbLeftButton Then
Me.Sort = FlexSortNone
' If LastColSort > -1 And LastColSort <> Me.HitCol Then Me.ColSort(LastColSort) = FlexSortNone
If LastColSort > -1 And LastColSort <> Me.HitCol Then Me.ColSort(LastColSort) = FlexSortNone
mlLastColumnOrder = Me.HitCol
Call FlexSetColSort(
Me.VBFlexGrid1, LastColSort, True)
Me.Cell(FlexCellSort, Me.FixedRows, LastColSort, Me.Rows - 1, LastColSort) = FlexSortUseColSort
Cancel = True
End If
End If
mbOrdDesc = False
Else
' Me.Sort = FlexSortStringDescending ' = FlexSortStringNoCaseDescending
If .HitResult = FlexHitResultCell And .HitRow < Me.FixedRows And .HitCol > Me.FixedCols - 1 Then
If (vbLeftButton) = vbLeftButton Then
Me.Sort = FlexSortNone
If LastColSort > -1 And LastColSort <> .HitCol Then Me.ColSort(LastColSort) = FlexSortNone
LastColSort = .HitCol
Call FlexSetColSort(
VBFlexGrid1, LastColSort, True)
Me.Cell(FlexCellSort, Me.FixedRows, LastColSort, Me.Rows - 1, LastColSort) = FlexSortUseColSort
Cancel = True
End If
End If
mbOrdDesc = True
End If
mlLastColumnOrder = .HitCol
Me.Row = Me.RowIndex(1)
Me.RowID(Me.RowIndex(1)) = 0 ' Remove temporary identification
Me.CellEnsureVisible
If Row1 <> Row2 Then Me.RowSel = IIf(Row1 < Me.Row, Row1, Row2)
If Col1 <> Col2 Then Me.ColSel = IIf(Col1 < Me.Col, Col1, Col2)
End If
'-------'FIN ORDENAR''''''''
''''
what I am looking for is that the ascending and descending order is within the control (ctl)
Attachment 182281
Hello, the function of ascending or descending order is already integrated in the control, the end user will only have to add the control to his form and declare:
private form_load ()
grid.coldata (1) = vbInteger, etc. according to your type of load data in your grid.
- Friend krool rather we could advance with progressbar in the cells, icons in the cells, similar to what is stated in: # 577.
thank you very much kroolAttachment 182282
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
lizano diaz
Hello friend, it does work well for the horizontal scrollbar, but it would still be missing for the Vertical scrollbar.
It's also for the vertical scrollbar but most of the cases the thumb is small as the row count is large.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Hello Krool!
Thank you for your excellent work and this control. I'd really love to include this grid in my software.
Attachment 182286
But I'm still using the msHFlexGrid control, because I need a multicolumn sort like showed in the example above. As you see the columns are sorted ascending and descending depending on other columns left or right. The title of each column shows the level (dots) and the order (up/down) of the columns sorting. The columns may be in any order as the user can easily rearrange them without affecting the sorted order.
Can we solve this sorting example in the vbFlexGrid?
Regards
Seniorchef
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Seniorchef
Hello Krool!
Thank you for your excellent work and this control. I'd really love to include this grid in my software.
Attachment 182286
But I'm still using the msHFlexGrid control, because I need a multicolumn sort like showed in the example above. As you see the columns are sorted ascending and descending depending on other columns left or right. The title of each column shows the level (dots) and the order (up/down) of the columns sorting. The columns may be in any order as the user can easily rearrange them without affecting the sorted order.
Can we solve this sorting example in the vbFlexGrid?
Regards
Seniorchef
The attachment does not work. But multi column sort is possible.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Hello, Krool!
I'm an unexperienced forum user. in preview mode i can see my uploaded image, also when i click 'Attachment 182286'. What am I doing wrong?
Greetings
Seniorchef
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
It seems you can't see attachments from other users.
Some kind of forum bug I assume.
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Ok - I'll try it in words.
I am quite sure the grid supports multicolumn sort. Here the columns to sort are not simply from left to right nor beneath each other.
E.g. a grid with 5 columns 'City' 'Name' 'Firstname' 'Street' 'Record' are to be sorted like a phonebook. That is 'City', 'Name', 'Firstname' - no matter what column number 'City' or 'Name' etc. are. I've seen the properties Grid.ColSort and Grid.ColData, but I guess I need a way to tell the sorting routine the order 'City' - 'Name' - 'Firstname' or better, the indices of the columns, not the range like Grid.Col and Grid.ColSel.
Greetings
Seniorchef
-
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
The attachment does not work. But multi column sort is possible.
Dear Krool, please, how could you adapt these features to the VbFlexgrid (attached image).
Thank you very much for your replyAttachment 182314