Jump to content
Software FX Community

Bug in Annotation objects? - Attach method


User (Legacy)

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

Archived

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

×
×
  • Create New...