Jump to content
Software FX Community

Attach Method of Annotation Arrow


User (Legacy)

Recommended Posts

Hi,

The following code works perfectly; however, If I uncomment the 2 lines and

attempt to bind the arrow to the chart, I get no line at all, no error, but

no line.

Any thoughts on this? I have tried to call attach at the beggining of the

procedure, at the end, and as illustrated below, in the middle. All the the

same result.

If m_blnStartedHoriz Then

'

m_blnStartedHoriz = False

InvertRgn m_lngChartHDC, m_lngRegion

Set m_objHorizontalLine = AnoExt.Add(OBJECT_TYPE_ARROW)

m_objHorizontalLine.Top = sngStartY / Screen.TwipsPerPixelY

m_objHorizontalLine.Left = sngStartX / Screen.TwipsPerPixelX

'strAttach = (sngStartX / Screen.TwipsPerPixelX) & "," & (sngStartY

/ Screen.TwipsPerPixelY) & "," & (m_objHorizontalLine.Left + (-1 *

((sngStartX / Screen.TwipsPerPixelX) - sngNewX))) & "," & (sngStartY /

Screen.TwipsPerPixelY)

'm_objHorizontalLine.Attach 2, strAttach

m_objHorizontalLine.Width = -1 * ((sngStartX /

Screen.TwipsPerPixelX) - sngNewX)

m_objHorizontalLine.Height = 0

m_objHorizontalLine.HeadStyle = ARROW_NONE

m_objHorizontalLine.TailStyle = ARROW_NONE

m_objHorizontalLine.Color = InverseColor(ChartFX.RGB2DBk)

m_objHorizontalLine.Refresh False

'

End If

This is called within ChartFX_LButtonUp if that makes a difference.

Thanks in advance,

Chase Gale

Link to comment
Share on other sites

Would I pass the attach method the double values for my dates on the X-axis

(pixeltovalue returns these), or convert the double values returned to

dates?

Thanks,

Chase

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:ytWFEM6eDHA.1484@WEBSERVER1...

> The attach method receives LOGICAL coordinate in X-Axis and Y-Axis units.

> You are passing PIXEL values to it.

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

Attach expects double values, the ones returned by PixelToValue or using the

XValue property should give you the desired results.

--

Regards,

JC

Software FX Support

"Chase Gale" <cgale@fxsol.com> wrote in message

news:zCq1fK7eDHA.1484@WEBSERVER1...

> Would I pass the attach method the double values for my dates on the

X-axis

> (pixeltovalue returns these), or convert the double values returned to

> dates?

>

> Thanks,

>

> Chase

>

> "SoftwareFX Support" <support@softwarefx.com> wrote in message

> news:ytWFEM6eDHA.1484@WEBSERVER1...

> > The attach method receives LOGICAL coordinate in X-Axis and Y-Axis

units.

> > You are passing PIXEL values to it.

> >

> > --

> > FP

> > Software FX, Inc.

> >

> >

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...