Jump to content
Software FX Community

Attach Method of Annotation Arrow


User (Legacy)
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...