Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
I'm experimenting with vbflexgrid and it's a great ocx. In my test project, I discovered that the mouse wheel scrolls 5 lines up or down for each movement. While the "down" and "up" keys only move one line. I haven't been able to look at all 40 pages that deal with this ocx on VbForums to see if the topic has already been discussed. I would also like the mouse wheel to move only one line: is it possible?
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by fabel358
I'm experimenting with vbflexgrid and it's a great ocx. In my test project, I discovered that the mouse wheel scrolls 5 lines up or down for each movement. While the "down" and "up" keys only move one line. I haven't been able to look at all 40 pages that deal with this ocx on VbForums to see if the topic has already been discussed. I would also like the mouse wheel to move only one line: is it possible?
The # of mouse wheel lines used is defined by your system settings, however it appears that Krool could expose a property to allow the default to be overridden. I've submitted a pull request to Krool for this feature, but I'm not sure if it will be accepted or not.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Thanks for the pull request. For the Ocx this would mean another typelib jump. Also the space at the property page is getting rare. Would you mind if that new exposed WheelScrollLines property would be run-time only?
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Thanks for the pull request. For the Ocx this would mean another typelib jump. Also the space at the property page is getting rare. Would you mind if that new exposed WheelScrollLines property would be run-time only?
In my opinion it may not be a "property" but it could also be set in "Run-Time", if it is possible.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Hello. I tried setting up tooltip text for checkboxes in cells in some columns. I was able to set the tooltip, but it doesn't work when I hover over the checkbox in the cells. Is this possible?
TIA.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Calcu
Hi, did you enable showinfotips ?
I don't know what it does but it was enabled already, ShowInfoTips and ShowLabelTips both are True.
I've set the tooltips with the CellToolTipText property, of the cells containing the checkboxes.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Eduardo-
I don't know what it does but it was enabled already, ShowInfoTips and ShowLabelTips both are True.
I've set the tooltips with the CellToolTipText property, of the cells containing the checkboxes.
When you have ShowLabelTips and ShowInfoTips set to True then it can happen that the info tip won't show in case the text is truncated. Because the label tip has then priority.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
When you have ShowLabelTips and ShowInfoTips set to True then it can happen that the info tip won't show in case the text is truncated. Because the label tip has then priority.
In the cells of that column I have only a checkbox and no text, and I want to display a tooltip when the user hovers over the checkbox to tell something about what it will do if checked. But the tooltip appears when the user hovers in the cell outside the checkbox, and not when hovering over the checkbox itself.
Originally Posted by Calcu
Sometimes it doesn't work for me in IDE mode, but when I compile the program it works fine.
In this case it works the same in IDE and compiled.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Eduardo-
In the cells of that column I have only a checkbox and no text, and I want to display a tooltip when the user hovers over the checkbox to tell something about what it will do if checked. But the tooltip appears when the user hovers in the cell outside the checkbox, and not when hovering over the checkbox itself.
Update released. Fixed. Thanks
Originally Posted by lizano diaz
The orientation property of the lines is not present.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
perfect,
It would only be necessary to adapt the the space between words (when loading long letters) is too small, it should be based on the content plus a few pixels of space.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by lizano diaz
perfect,
It would only be necessary to adapt the the space between words (when loading long letters) is too small, it should be based on the content plus a few pixels of space.
I don't understand this one. The text is drawn by the font selected using DrawText API. What space where?
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
I don't know what I'm doing wrong, I've already tried all the code examples, I'm getting the data from a database (FARMINDUSTRI SA) which is a long text
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Hello everyone.
I have both Windows 10 and Windows 11 installed on my PC. On both systems, my project uses VBFLXGRD18.ocx, and the mouse wheel scrolls perfectly. However, when I try my application on Windows 8 and/or Windows 7, the wheel no longer works. Has anyone else experienced this issue?
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by fabel358
Hello everyone.
I have both Windows 10 and Windows 11 installed on my PC. On both systems, my project uses VBFLXGRD18.ocx, and the mouse wheel scrolls perfectly. However, when I try my application on Windows 8 and/or Windows 7, the wheel no longer works. Has anyone else experienced this issue?
I haven't received a response. Am I the only one experiencing mouse wheel scrolling issues on Windows 7, 8, or 8.1? Or is everyone else on vacation?
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
In WinXP, the mouse wheel in the demo works, but it doesn't in my application. Evidently, something in my application is disabling mouse wheel subclassing, and this doesn't happen in Windows 10 and 11.
Last edited by fabel358; Aug 8th, 2025 at 02:36 AM.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Other questions. If I want to delete only text in a selection, like
Code:
With flex
.Row = 1
.col = 1
.RowSel = .Rows - 1
.ColSel = .Cols - 1
End With
I have to use ".Clear FlexClearClip, FlexClearText " or ".Clear FlexClearSelection, FlexClearText"?
What is the difference between "delete" and "clear"?
The instructions at https://helpcentral.componentone.com...ridcontrol.htm
don't explain "FlexClearClip.": there's no instruction for VBFLEXGRID18.OCX?
Last edited by fabel358; Aug 18th, 2025 at 12:20 PM.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Eduardo-
Did you perform any testing to see what those properties do? (maybe you'll save a lot of time)
That's what I'm doing, following Eduardo's advice to replace MsFlexGrid with VBFlexGrid18 (https://www.vbforums.com/showthread....=1#post5680371): the results aren't entirely as expected, which is why I posted these questions. Personally, I wanted to better understand the potential of VbFlexGrid... no polemic, if I've bothered anyone, I'm sorry.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by fabel358
That's what I'm doing, following Eduardo's advice to replace MsFlexGrid with VBFlexGrid18 (https://www.vbforums.com/showthread....=1#post5680371): the results aren't entirely as expected, which is why I posted these questions. Personally, I wanted to better understand the potential of VbFlexGrid... no polemic, if I've bothered anyone, I'm sorry.
I mean, these are not commercial products and so many times don't have a full documentation. But in most cases you can realize what the properties do by just experimenting.
That's what I do anyway, unless the issue seems to complex. But what you are asking doesn't seem too complex to experiment, check, and see what those properties do.
And after you figure them out, you can post your conclusions here so other users (meaning other programmers) that have the same questions in the future can search with Google (or whatever search engine or AI tool they use) and find your explanations. That's is how this cooperative work is done. Not by only one person, but everyone doing what they can.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Hello Everyone,
I've just started using VBFlexGrid and i can't seem to register the custom controls to add to a worksheet or form. I select "Register Custom" from the tool box and then the VBFLXGRD18.OCX file but get the message "The selected file does not contain any self-registering ActiveX controls."
I am using office 365 64-bit on a Windows 11 machine.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by fabel358
Hello everyone.
I have both Windows 10 and Windows 11 installed on my PC. On both systems, my project uses VBFLXGRD18.ocx, and the mouse wheel scrolls perfectly. However, when I try my application on Windows 8 and/or Windows 7, the wheel no longer works. Has anyone else experienced this issue?
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by jpbro
The OCX is 32-bit and won't work with 64-bit host apps.
Okay, so the OCX file is not 64 bit ready as mentioned in the initial posts?
What needs to be done to it to make it 64 bit as reading back through the post people have this working; recompile the project?
Sorry if this question seems a bit basic but i am a bit of a newbie with this.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
hello krool
is there a more straight way to check if at least one row is checked.
I'm using this code todo so
Code:
Dim flag As Boolean, lRow%
With VBFlexGrid1
flag = True
For lRow = 1 To .Rows - 1
VBFlexGrid1.Col = 0
VBFlexGrid1.Row = lRow
If VBFlexGrid1.CellChecked = FlexChecked Then flag = False
Next
End With
If flag = True Then
MsgBox "You should at least check one row"
End If
thank you
please excuse my little knowledge
How to change the background color of a row once checked and which event is used on the grid?
I mean the event like temBkColor on the listview
this is how I'changing the background
Code:
Private Sub VBFlexGrid1_CellCheck(ByVal Row As Long, ByVal Col As Long)
Dim c As Long
Dim lRow As Long
With VBFlexGrid1
For lRow = 1 To .Rows - 1
.Row = lRow
For c = 0 To .Cols - 1
.Col = c
If VBFlexGrid1.CellChecked = FlexChecked Then .CellBackColor = vbRed
Next c
Next lRow
End With
End Sub
I need to add this code on row check
if row is checked change the whole row background to red
With the code above Iget only the first column colored red.
thank you
Last edited by Mustaphi; Oct 18th, 2025 at 11:41 AM.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Mustaphi
hello krool
is there a more straight way to check if at least one row is checked.
I'm using this code todo so
Code:
Dim flag As Boolean, lRow%
With VBFlexGrid1
flag = True
For lRow = 1 To .Rows - 1
VBFlexGrid1.Col = 0
VBFlexGrid1.Row = lRow
If VBFlexGrid1.CellChecked = FlexChecked Then flag = False
Next
End With
If flag = True Then
MsgBox "You should at least check one row"
End If
thank you
please excuse my little knowledge
How to change the background color of a row once checked and which event is used on the grid?
I mean the event like temBkColor on the listview
this is how I'changing the background
Code:
Private Sub VBFlexGrid1_CellCheck(ByVal Row As Long, ByVal Col As Long)
Dim c As Long
Dim lRow As Long
With VBFlexGrid1
For lRow = 1 To .Rows - 1
.Row = lRow
For c = 0 To .Cols - 1
.Col = c
If VBFlexGrid1.CellChecked = FlexChecked Then .CellBackColor = vbRed
Next c
Next lRow
End With
End Sub
I need to add this code on row check
if row is checked change the whole row background to red
With the code above Iget only the first column colored red.
thank you
See below optimized code blocks
Code:
Dim flag As Boolean, lRow%
With VBFlexGrid1
flag = True
For lRow = .FixedRows To .Rows - 1
If .Cell(FlexCellChecked, lRow, .FixedCols) = FlexChecked Then
flag = False
Exit For
End If
Next lRow
End With
If flag = True Then
MsgBox "You should at least check one row"
End If
Code:
Private Sub VBFlexGrid1_CellCheck(ByVal Row As Long, ByVal Col As Long)
Dim OldFillStyle As FlexFillStyleConstants
With VBFlexGrid1
OldFillStyle = .FillStyle
.FillStyle = FlexFillStyleRepeat
If .Cell(FlexCellChecked, Row, .FixedCols) = FlexChecked Then
.Cell(FlexCellBackColor, Row, .FixedCols, , .Cols - 1) = vbRed
Else
.Cell(FlexCellBackColor, Row, .FixedCols, , .Cols - 1) = -1
End If
.FillStyle = OldFillStyle
End With
End Sub
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
thank you Krool
At first I got trouble with the code because I was using a fixed column.
Then I removed the fixed column and I got it worked.
thank you very much
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Hello again Krool
I need to allow only numeric values and the decimal point in column 2 but this code doesn't seem to work
Code:
Private Sub VBFlexGrid1_KeyPress(KeyChar As Integer)
With VBFlexGrid1
If .Col = 2 Then
Select Case KeyAscii
Case vbKey0 To vbKey9
Case Asc(".")
Case Else
KeyAscii = 0
End Select
End If
End With
End Sub