Krool wrote a really great control, VBFlexGrid. For vbRichClient users, we also really needed a component like VBFlexGrid, so I rewrote Krool's VBFlexGrid with RC6.
I developed RCFlexGrid (cwFlexGrid) for 3 purposes:
(1) With the help of vbForums' experts, RCFlexGrid can be optimized and transformed into a grid control that is comparable in performance to Farpoint-Spread.
(2) With the help of vbForums' experts, RCFlexGrid can provide very powerful and smooth input features/capabilities, so that the application scenarios of RCFlexGrid will be greatly expanded, for example, RCFlexGrid/VBFlexGrid can be used to simulate and replace RichTextBox and Excel.
(3) Provide an example for vbRichClient users to rewrite GDI controls. Since we can use RC6 to rewrite the extremely complex VBFlexGrid, we can also use RC6 to rewrite Krool's ComCtls, so that we can have two sets of components at the same time: GDI-ComCtls and Cairo-ComCtls. My cloned VB6-IDE will use both sets of components.
At present, RCFlexGrid only implements 90% of the features of VBFlexGrid, and RCFlexGrid has not been rigorously tested, and there are still many bugs in the current version, which need to be tested and fixed by vbRichClient enthusiasts. Any feedback, suggestions and guidance would be greatly appreciated.
Note:
RCFlexGrid provides a solution to integrate and use WinTheme in RC6.Cairo (maybe Olaf has a better way).
Problems that need to be addressed by community experts and vbRichClient enthusiasts
Code:
(1) Reduce the number of draws (refreshes) of RCFlexGrid to the same as that of VBFlexGrid
- RCFlexGrid draws (refreshes) too often, especially in the editing state. When the CellEditBox is moved from one cell to another, Focus will frequently switch between cwFlexGrid and CellEditBox, which causes the GotFocus event and LostFocus event of the cwFlexGrid and CellEditBox to be triggered frequently, which also causes the cwFlexGrid to have to be refreshed frequently, and the DrawGrid procedure of thousands of lines of code is called frequently.
- Currently, the DrawGrid procedure is repeated 9 times each time the CellEditBox is moved from one cell to another. Although I could add some member-variables and conditional controls to reduce the DrawGrid call, even then the DrawGrid procedure will be called at least 3-4 times.
- Krool's VBFlexGrid, on the other hand, will always only call DrawGrid procedure once when moving a CellEditBox from one cell to another.
(2) Draw (refresh) a cell instead of drawing the whole grid
- Currently, every time the DrawGrid procedure is executed, the entire grid is redrawn. If only draw (refresh) a certain number of cells that needs to be refreshed, then the drawing efficiency will be greatly improved.
(3) Provide cell-level Owner-Drawn
-
(4) Increase the performance of RCFlexGrid to a level comparable to that of Fapoint-Spread
- At present, RCFlexGrid loads large data 3-8 times faster than VBFlexGrid, but further optimization of RCFlexGrid is still needed to further improve its performance.
(5) Make RCFlexGrid the best alternative to RichTextBox
Making RCFlexGrid the perfect alternative to RichTextBox will greatly expand the range of uses for RCFlexGrid.
List of revisions:
Code:
15-Apr-2024
- Add AppearanceStyle (Now RCFlexGrid has a similar appearance to Farpoint-Spread)
13-Apr-2024
- Removed a large number of unused Win32-APIs
Add CellFlooding
Add Grid WallPaper (When the wallpaper is exist, the merged cells are drawn abnormally)
10-Apr-2024
- First release.
Last edited by SearchingDataOnly; Apr 24th, 2024 at 05:34 AM.
Problems that need to be addressed by community experts and vbRichClient enthusiasts
(1) Reduce the number of draws (refreshes) of RCFlexGrid to the same as that of VBFlexGrid
RCFlexGrid draws (refreshes) too often, especially in the editing state. When the CellEditBox is moved from one cell to another, Focus will frequently switch between cwFlexGrid and CellEditBox, which causes the GotFocus event and LostFocus event of the cwFlexGrid and CellEditBox to be triggered frequently, which also causes the cwFlexGrid to have to be refreshed frequently, and the DrawGrid procedure of thousands of lines of code is called frequently.
Currently, the DrawGrid procedure is repeated 9 times each time the CellEditBox is moved from one cell to another. Although I could add some member-variables and conditional controls to reduce the DrawGrid call, even then the DrawGrid procedure will be called at least 3-4 times.
Krool's VBFlexGrid, on the other hand, will always only call DrawGrid procedure once when moving a CellEditBox from one cell to another.
(2) Draw (refresh) a cell instead of drawing the whole grid
Currently, every time the DrawGrid procedure is executed, the entire grid is redrawn. If only draw (refresh) a certain number of cells that needs to be refreshed, then the drawing efficiency will be greatly improved.
(3) Provide cell-level Owner-Drawn
-
(4) Increase the performance of RCFlexGrid to a level comparable to that of Fapoint-Spread
At present, RCFlexGrid loads large data 3-8 times faster than VBFlexGrid, but further optimization of RCFlexGrid is still needed to further improve its performance.
(5) Make RCFlexGrid the best alternative to RichTextBox
Making RCFlexGrid the perfect alternative to RichTextBox will greatly expand the range of uses for RCFlexGrid.
Last edited by SearchingDataOnly; Apr 24th, 2024 at 05:35 AM.
RCFlexGrid's properties and data structure are exactly the same as VBFlexGrid's, and without changing any of VBFlexGrid's data loading algorithms, RCFlexGrid loads large data 3-8 times faster than VBFlexGrid, I don't know why. Maybe it's because of the difference in the read/write efficiency between class-properties and usercontrol-properties.
Attached is an example of my test of Krool's VBFlexGrid, please check it.
Last edited by SearchingDataOnly; Apr 24th, 2024 at 05:35 AM.
Is it just a demo using RC6?
Full of bugs, nobody will use it. (I don't want waste my time to write details, because you even haven't yet done full test for this simple demo)
Last edited by DaveDavis; Apr 11th, 2024 at 07:07 PM.
Is it just a demo using RC6?
Full of bugs, nobody will use it. (I don't want waste my time to write details, because you even haven't yet done full test for this simple demo)
That's a bit harsh I think considering this:
Originally Posted by SearchingDataOnly
RCFlexGrid has not been rigorously tested, and there are still many bugs in the current version, which need to be tested and fixed by vbRichClient enthusiasts. Any feedback, suggestions and guidance would be greatly appreciated.
Most doubted that SDO would ever release any concrete code. Now here it is, and I think it should be given a fair shake. IMO it's better to waste time writing details of what you didn't like/what didn't work than to waste time writing that you won't waste time.
They probably don't want to waste their time but instead work and polish all of their submissions to CodeBank. . . Don't stop these people from contributing here with your half-baked codes :-))
Would you consider Krool's release of ComCtls in 2012 to be half-baked code?
Would you consider Krool's VBFlexGrid release in 2017 to be half-baked code?
Would you think that twinBasic is half-baked code?
Are you operated from sense of humor or your understanding of English language is lacking?
Satire -- go check the meaning of this word. And it's not your work which is getting ridiculed here if you read the thread more carefully.
Admin action required: go cleanup the humor, it's not getting accross.
Why did I think wqweto was mocking me? For the first time, I had doubts about my ability to read English. Until now, I still don't seem to be able to understand what wqweto meant.
It took me three weeks to rewrite VBFlexGrid with RC6, which is not an easy task for someone who is extremely busy at work and in getting worse health. So when I saw the aggressive words and the mocking words, I felt very angry.
Well, neither of you is a native English speaker (nor am I for that matter) so subtle nuances can sometime escape our grasp.
Yes, but I should apologize to wqweto anyway. I've seen wqweto's sarcastic comments about me many times before, and maybe many of them were due to my misunderstandings.
- Removed a large number of unused Win32-APIs
- Add CellFlooding
- Add Grid WallPaper
Note: When the wallpaper is exist, the merged cells are drawn abnormally.
This issue will be left for a later date (Or rather, it should be left to the vbRichClient enthusiasts in the community to figure it out)
Last edited by SearchingDataOnly; Apr 13th, 2024 at 07:23 AM.
At present, only three features of RCFlexGrid have not yet been added, which are Cell-Tooltip and Scroll-Tip and Dropdwon-Calendar. But these three features are not urgently needed, and I plan to defer them until later, maybe in the future I will provide a rich text Cell-Tooltip.
That said, with RCFlexGrid, what I was able to do was basically done. The rest needs to be done by vbForums experts and vbRichClient enthusiasts. I'll continue my job: scripting language compiler and Cloned-VB6IDE.
Last edited by SearchingDataOnly; Apr 13th, 2024 at 07:22 AM.
Thank you, wqweto. I used to sign up for a GitHub account a few years ago, but I never used it. Now, not only have I forgotten the password for my account, but I don't even remember the name of my account. In six months, I'll have a major product launch, at which point I'll be re-signing up for a GitHub account and building my own website.