Jump to content
Software FX Community

Bug in Annotation objects? - Attach method


User (Legacy)
 Share

Recommended Posts

Hi

The following does not work!

xy = "100,2"

objPic.Attach ATTACH_CENTER, xy

But this does:

objPic.Attach ATTACH_CENTER, "100,2"

In the first case, the object gets drawn at the top left of the chart. In

the second case, it gets drawn in the correct position.

Why?

Laurence

PS Scroll down for more of the listing...

Private Sub PlotSignals()

'---------------------------------------------------------------------------

---------------

'Loops through the signals collection, adding annotation objects to the

chart.

' [iN] annX Pointer to the Annotation Extension

' Signals Collection of Signal objects

'---------------------------------------------------------------------------

---------------

Dim sig As Signal

Dim objPic As Object

Dim xy As String

For Each sig In Signals

Set pic = annX.Add(OBJECT_TYPE_PICTURE)

xy = CStr(sig.position) & ",2"

With pic

.Width = 32

.Height = 8

.Color = CHART_TRANSPARENT

.BkColor = CHART_TRANSPARENT

.Attach ATTACH_CENTER, xy

Set .Picture = ImgSigGrey.Picture

.Refresh False

End With

Next

End Sub

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...