Display Icons in a Custom Image Point Series

TeeChart for ActiveX, COM and ASP
Post Reply
DraegerSoft
Newbie
Newbie
Posts: 4
Joined: Thu Oct 18, 2007 12:00 am

Display Icons in a Custom Image Point Series

Post by DraegerSoft » Mon Jan 21, 2008 12:32 pm

I'm working in VB6 and want to display timed events as icons along the top horizontal Axis of a graph which also records temperature and Pressure over time.

If I use an image point series, can I set a custom Icon at run time depending on the type of event?
I have a list view of the data which uses icons from an imagelist control, and would want to use the same icons. It looks as if this should be possible, but I can't find anything in the tutorials/help

Many Thanks

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Tue Jan 22, 2008 10:21 am

Hi DraegerSoft,

If I understand well you could use a method like following:

Code: Select all

Private Sub paint(num As Integer)
  TChart1.Series(0).asImagePoint.ImagePoint.AssignImage ImageList1.ListImages.Item(num).Picture
End Sub
and call it in all the events you need with the parameter you want. For example, if you want to show the first image from the list when OnClick event is fired:

Code: Select all

Private Sub TChart1_OnClick()
  paint 1
End Sub
You could also take a look at those two demos where imagelists are used too:
Whats New->New Features->Canvas->Custom Shape->Picture
All Features->Miscellaneous>Legend->Symbol OnDraw
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply