I tried some settings and I can't restore the initial conditions . Is there a possibility of a reset?
I don't know what you mean by "settings", "initial conditions" and "reset".
Unless you are very, very specific about what you did, what you expected and what you got...
Sometimes with controls that have many properties, and properties that we don't know what they do, we can get to a situation that we want to go back but don't know how.
Unfortunately VB6 does not provide a way to undo changes in properties.
Controls could keep track of the changes and offer a way to go back or to go forward, like a "history".
I never saw a control like that, but is possible.
The only thing I do when I get to that "state", is to close the project without saving. In case that you didn't do other important changes that need to be preserved... That's why I save the project frequently while it is in a good state.
I'll start by saying that "NewTab01.ocx" is a great job, however I found what I think is a "bug".
If I place a flexgrid with MsFlexGrid on NewTab, populate it with data and with the Flex_MouseMove subroutine, set a different tooltiptext for each cell and a Toolitip in the NewTab, it happens that in the IDE everything works as expected. If I compile the code, moving the mouse over the flexgrid, instead of the flexgrid tooltiptext appearing, the newtab tooltiptext continues to appear.
I add the code; to make it work open a new form, place NewTab1 on it and inside this MsFlexGrid with the name Flex and verify.
In a Form:
Code:
Option Explicit
Private Sub Flex_MouseMove(Button As Integer, Shift As Integer, x As Single, y _
As Single)
Dim lRow As Integer
Dim lCol As Integer
Dim Tip As String
With Flex
lRow = .MouseRow
lCol = .MouseCol
Tip = .TextMatrix(lRow, lCol)
If LenB(Tip) Then
.ToolTipText = Tip
End If
End With
End Sub
Private Sub Form_Load()
Dim x As Integer
Dim y As Integer
With Flex
For y = 1 To .Cols - 1
For x = 1 To .Rows - 1
.TextMatrix(x, y) = CStr(x) & " - " & CStr(y)
Next x
Next y
End With
NewTab1.ToolTipText = "This is NewTAB01"
End Sub
Last edited by fabel358; Jul 3rd, 2025 at 07:29 AM.
It seems there is a bug in the MSFlexGrid. It also happens with a bare UserControl. But with the UserControl of the same project it also happens in the IDE.
On other hand, a PictureBox works fine.
Attached is the test project.
Anyway, why do you want to put a ToolTipText for the whole NewTab control? Perhaps you rather woud like to put tooltip text to the individual tabs. For that use the TabToolTipText property.
It seems there is a bug in the MSFlexGrid. It also happens with a bare UserControl. But with the UserControl of the same project it also happens in the IDE.
On other hand, a PictureBox works fine.
Attached is the test project.
Anyway, why do you want to put a ToolTipText for the whole NewTab control? Perhaps you rather woud like to put tooltip text to the individual tabs. For that use the TabToolTipText property.
However, with TabCtl32.ocx, this problem does not happen, regardless of whether tooltiptext or TabToolTipText is used in NewTab01.ocx
However, with TabCtl32.ocx, this problem does not happen, regardless of whether tooltiptext or TabToolTipText is used in NewTab01.ocx
Yes, it seems to be a problem of VB6's UserControl (in what is based the NewTab) with MSFlexGrid or maybe with any third party control (that would require to check and see).
Anyway, I don't see any usefulness in setting the ToolTipText property in the NewTab control. That property is automatically added by VB, I didn't add the feature myself. I think it makes no sense for this kind of control.
What I did add, is the TabToolTipText property.
Originally Posted by fabel358
However, with TabCtl32.ocx, this problem does not happen, regardless of whether tooltiptext or TabToolTipText
The SSTab did not have the TabToolTipText property.
In summary: I don't think there is much I can do since it is a VB6 bug. On the other hand, I don't think it is a real issue, because I don't see a real life case when setting the ToolTipText on a NewTab control would make much sense.
We don't quite understand each other. What I was interested in was not so much having the ToolTipText property for the "TAB"; I was interested in being able to have ToolTipText working in the flexgrid (as I showed in the example); adding msFlexGrid to NewTab - whether or not it has "ToolTipText" set, does not make the ToolTipText of the msFlexGrid appear - or rather: it works in the IDE but not in the compiled program. I repeat that the problem, with TabCtl32.ocx (which is less performant and less beautiful than NewTab01.ocx) does not happen; to verify what I write it is sufficient to change NewTab01.ocx with TabCtl32.ocx and exactly what I am describing happens. So I do not believe it is a bug of VB6.
Well, there is another solution. Use the VBFlexGrid. I just tested and the problem seems to be with MSFleGrid, MSHFlexGrid, and maybe all third party non-VB6 generated OCX, or at least MS-ones, but not with third party controls created with VB6.
It does not happen with intrinsic controls either (such as TextBox, PictureBox, etc.)
The VBFlexGrid is a MSFlexGrid replacement created by Krool and with many advantages (for example supporting Unicode and many other improvements).
Last edited by Eduardo-; Jul 6th, 2025 at 06:50 AM.
Now I understand what you meant when you explained that it is a bug of VB6. I can't use VBFlexGrid because I had to implement functions in msFlexGrid, which Krool's VBFlexgrid doesn't have (I had already asked Krool about this months ago); I mean I don't want to get bogged down in re-adapting and rewriting a lot of the code. So I'm staying with TabCtl32.ocx, even if your control is much better.
Many thanks.
Now I understand what you meant when you explained that it is a bug of VB6. I can't use VBFlexGrid because I had to implement functions in msFlexGrid, which Krool's VBFlexgrid doesn't have (I had already asked Krool about this months ago); I mean I don't want to get bogged down in re-adapting and rewriting a lot of the code. So I'm staying with TabCtl32.ocx, even if your control is much better.
Many thanks.
I tested a workaround and it worked: just place the MSFlexGrid inside a PictureBox:
PS: I'm curious, what is the feature that the VBFlexGrid lacks and MSFlexGrid has?
Neither Grid has the function I wanted, so I created it for MsFlexGrid because I didn't want to get bogged down in adapting the code for VBFlexGrid. I needed a function that would allow me to have text in different styles and even different colors within the same cell. I achieved this through the use of pictureboxes with relative manipulation of row heights.Attachment 195109
Here's the effect I wanted; I've removed some of the names for privacy but there's enough visibility to see what I mean.
P.S. If you don't see it, I'll provide the Google Drive links
Last edited by fabel358; Jul 6th, 2025 at 12:43 PM.
Neither Grid has the function I wanted, so I created it for MsFlexGrid because I didn't want to get bogged down in adapting the code for VBFlexGrid. I needed a function that would allow me to have text in different styles and even different colors within the same cell. I achieved this through the use of pictureboxes with relative manipulation of row heights.Attachment 195109
Here's the effect I wanted; I've removed some of the names for privacy but there's enough visibility to see what I mean.
P.S. If you don't see it, I'll provide the Google Drive links
Ah, OK, then the MSFlexGrid didn't support what you wanted either. But I mean, why the same code (the same workaround) that you used with MSFlexgrid could not be used with VBFlexGrid?
Originally Posted by fabel358
I also verified what you wrote: I introduced the FlexGrid in a PictureBox and now the custom ToolTipText actually works. Congratulations!
I already gave the answer.
My project is finished. It has 21 tabs, with 5 flexgrids per tab, plus more in other forms; just replacing TabCtl32.ocx with your NewTab01.ocx, despite the ease of replacing one ocx with the other, gave me the nasty surprise of the impossibility of custom tooltiptexts in the grid (at least there was a FAQ that would have warned me of the problem - but I think you didn't even know about this defect); not to mention the different sizes of the various themes, hence the use of the most generic theme (i.e. sstab).
Imagine replacing more than 100 flexgrids on an already finished project: any difference in the management of anything, would cost me hours and hours to re-adapt all the code.
No thanks!
Last edited by fabel358; Jul 6th, 2025 at 05:05 PM.
I'm not saying that you should do it, but just for the record, you could replace the MSFlexGrid with The VBFlexGrid quite easily.
1) Make a backup copy of the whole project (just in case that things go wrong, to be able to go back).
2) Get some tool to make text replacements on multiple files. I use TexRep.
3) Register VBFlexGrid v18.
4) Replace in the vbp file
And... if everything goes right, the project should open now using all VBFlexGrids instead of MSFlexGrids.
And if not... delete and put the backup back.
5 minutes.
OK, 10 minutes for being the first time.
We don't understand each other.
My project has many "forms" and more than 31 thousand lines of code; "texrep" does not allow to select specific extensions, such as .vbp or .frm; even replacing the files with *.*, in several files the MsFlexGrid control remained, despite "TexRep" having indicated the replacement.
I would have liked to trust your advice, but your suggestion is valid for maybe a few hundred lines of code and half a dozen controls.
Or I should have started my application already with the NewTab01.ocx and VBFLXGRD18.ocx controls perfectly working and not "work in progress", building all the architecture around them.
Thanks for your patience and do not feel offended if I do not follow your suggestions.
We don't understand each other.
My project has many "forms" and more than 31 thousand lines of code; "texrep" does not allow to select specific extensions, such as .vbp or .frm;
Yes, it does.
Originally Posted by fabel358
even replacing the files with *.*, in several files the MsFlexGrid control remained, despite "TexRep" having indicated the replacement.
I would have liked to trust your advice, but your suggestion is valid for maybe a few hundred lines of code and half a dozen controls.
You can replace any number of controls in any number of forms at once (in less than 1 second).
Originally Posted by fabel358
Thanks for your patience and do not feel offended if I do not follow your suggestions.
Hello Eduardo, I hope you are well.
I always download the latest version from GitHub.
This version has a problem with the right-to-left tab order.
If you select the right-to-left characteristic
error :
RightToLeft is only available for Top orientation.
When I set the Tab Orientation section
Tabs should start from the right and the X symbol
Previous versions did not have this problem. I will send a picture of the old version.
And notice another problem: when we're in the home tab, the corners of the controls are perfectly rounded
but when I switch to another tab, they lose their shape and beauty.
Also, the number of tabs increases, which messes up the layout and appearance. This problem is the same in both left-to-right and right-to-left tab directions. If you have a lot of tabs open, it will look messy.
I don't know if the theme settings have changed in the new version!
And the right-to-left problem has also appeared. In the default theme, there is a white frame around the tank, which is really ugly. Use colored backgrounds for better visibility. It is not as visible on a white background.
Sample project :
Last edited by Mojtaba; Sep 24th, 2025 at 09:22 AM.
OK, I'm working on it.
Fixing one issue I found many other related to right-aligned tab orientation that was the last feature I added.
I have to study the other issues.
What DPI setting did you have when you took those screen shots? (the Windows screen scale).
OK, I'm working on it.
Fixing one issue I found many other related to right-aligned tab orientation that was the last feature I added.
I have to study the other issues.
What DPI setting did you have when you took those screen shots? (the Windows screen scale).
I only take screenshots of the form. Not the whole page.
If you want more details
Windows 10
Resolution: 1600 * 900
If you want me to take a video ?
OK, as mentioned in the previous post I fixed several issues mostly related when the tabs are right-aligned.
But when I'm testing and changing properties I find some other issues, just for example: for client area, the top have to consider the FlatBodySeparationLineHeight to start the client area (the ClientTop for top aligned TabOrientations). It is not taking that into accout now. It is just an example.
For the TDI Forms mode I'll have to make a Region for the PictureBox containing the forms, so the rounded corners show well.
For the issue that RightToLeft is not supported for bottom TabOrientations, it is because I handle the bottom orientation in a special way. But I have an idea to fix that, that will involve changing how the bottom orientations are handled.
These things I guess they could take a couple of more days.
But... I'm thinking in changing how the TDI Mode Forms handle icons. Because it actually shows two icons, one is the X to close the tabs and I added another icon for the forms icons.
I'm thinking in completely change that, making a Closable property that could be used for all the tabs, not just the TDI mode, not using the normal icon for the X. And then for the TDI mode use that feature, not having a custom icon anymore but using the normal icons.
That is a big change, and could take more time.
I'm currently busy working in a program that I have to finish I hope in a couple of months.
So... I can't spend so many days now on this control. It is fun for me, I enjoy working on this control, but maybe I'll have to do it in free time or when I'm tired of working in the other program. Then it could take longer.
Also the TDI MOde is limited to Top and Bottom orientations, but why? If everything is fine and when structured it should also work in any TabOrientation (we'll see, I don't remember now what what the problem with that that lead me to put that limitation)
So, if you need some fix soon, I could do just that now, but maybe what you need involves things that will take more time, like fully fixing RightToLeft.
I can share the OCX with the current fixes if you want, but I think I only fixed one of the several issues that you posted.
I'll keep working now a bit more I guess, but I won't be able to fix them all right now because I can't delay the other program's work a week or so that maybe all these fixes will take.
OK, as mentioned in the previous post I fixed several issues mostly related when the tabs are right-aligned.
But when I'm testing and changing properties I find some other issues, just for example: for client area, the top have to consider the
Eduardo, thank you for your time. I have a project where I use newtab a lot and the other parts of the program are not yet complete and I am not in a hurry to finish it. Please fix the control problems in your free time.
Eduardo, thank you for your time. I have a project where I use newtab a lot and the other parts of the program are not yet complete and I am not in a hurry to finish it. Please fix the control problems in your free time.
OK, fine. I'll report back when I have something to test.