Sirs,
I drew a legend in the graph when I clicked in one point.
I'm using canvas, but when I changed the focus to another form, my legend disappear.
Or when I scroll the graph the legend disappear too.
Can You help me?
Igor
Canvas disappears
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Igor,
Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Canvas disappears
Narcís,
I drew a Line diagonally from top left to bottom right, using the code above:
With TChart1
.Canvas.MoveTo .Axis.Left.Position, .Axis.Top.Position
.Canvas.LineTo .Axis.Right.Position, .Axis.Bottom.Position
End With
But when I scrolled the graph, the line disappears.
Can you help me fixed this?
Thanks,
I drew a Line diagonally from top left to bottom right, using the code above:
With TChart1
.Canvas.MoveTo .Axis.Left.Position, .Axis.Top.Position
.Canvas.LineTo .Axis.Right.Position, .Axis.Bottom.Position
End With
But when I scrolled the graph, the line disappears.
Can you help me fixed this?
Thanks,
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Igor,
You need to use this code in the OnAfterDraw event:
You need to use this code in the OnAfterDraw event:
Code: Select all
Private Sub TChart1_OnAfterDraw()
With TChart1
.Canvas.MoveTo .Axis.Left.Position, .Axis.Top.Position
.Canvas.LineTo .Axis.Right.Position, .Axis.Bottom.Position
End With
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |