This project is read-only.

FoxCharts on PageFrames where tabs are on the side

Topics: Attention VFPX Admins, Bug Information
May 26, 2009 at 12:05 PM

I have a form where I use PageFrames for multiple charts...the tabs for the PageFrames are along the left hand side. Majority of the time this is not an issue...but I have come across at least 2 machines where the calculation of where the mouse is (for the mouseover event to fire the correct data point value) is off by the width of the tab. I have found some references to this being an issue via google.

I have gone through with debug to figure this out and have narrowed it down (I think).

There method is FoxCharts._GetRelativePositions() which currently states:

This._xRelative = Objtoclient(This, 2) && Left
This._yRelative = Objtoclient(This, 1) && Top

Changed it to:

Store 0 To nX,nY
oWalk = This
Do While .T.
Do Case
Case m.oWalk.BaseClass == "Form"
Case m.oWalk.BaseClass == "Pageframe"
* Add position of pageframe and add tab size
nY = m.nY + m.oWalk.Top + (m.oWalk.Height - m.oWalk.PageHeight)
nX = m.nX + m.oWalk.Left + (m.oWalk.Width - m.oWalk.PageWidth)
Case Pemstatus(m.oWalk, "top", 5)
nY = m.nY + m.oWalk.Top
nX = m.nX + m.oWalk.Left
Case m.oWalk.BaseClass == "Page"
* Do nothing

oWalk = m.oWalk.Parent

This._xRelative = m.nX
This._yRelative = m.nY

Problem is that the Values are still different by 2-3 pixels. Has anyone else run into this? Is there a better solution?

May 30, 2009 at 2:55 PM

Hi CHamlin,

I've just fixed it in version 1.17b.

Please download and run the updated sample ChartsSample_InaPageFrame.scx

In fact, the fix was already there, but I don't know why... I had left those 2 lined as "commented" - *!*